Flutter

Cross-platform mobile framework

Kamil Rykowski

Flutter

What is it?

Open source framework for building mobile cross platform applications based on Dart.

Who's using it?

  • 27 February 2018 - beta release
  • 20 June 2018 - release preview
  • Material Design
  • Official support for Android & iOS
  • Share codebase (including presentation)

Highlights

  • Unofficial desktop embedding
  • Custom UI rendering (no OEM widgets)
  • Hot reloading
  • High performance

Highlights

...more

  • OOP
  • Static typing
  • Support for JIT & AOT compilation
  • Developed by Google (just like Flutter)
  • More popular than COBOL

Dart language

But why?

Alternative tech

do you event lift?

Run the app

Simple entry point

// main.dart

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Text('my app'),
    );
  }
}

void main() => runApp(App());

Core of the Widgets

Show me the code!

class MyWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Text('text 1'),
        RaisedButton(
          child: Text('press'),
          onPressed: () {},
        ),
      ],
    );
  }
}

State management

Basics

class MyWidget extends StatefulWidget {
  @override
  MyState createState() => MyState();
}

class MyState extends State<MyWidget> {
  int clickCount = 0;
  @override
  Widget build(BuildContext context) {
    return RaisedButton(
      child: Text('counter: $clickCount'),
      onPressed: () => setState(() {
        clickCount++; }),
    );
  }
}
  • InheritedWidget (built-in)
  • Scoped Model
  • Redux
  • BLOC
  • RxVMS
  • MVC
  • rebloc
  • Dartea

State management

Advanced

The future

Is it worth it?

?

Flutter - cross-platform mobile framework

By Kamil Rykowski

Flutter - cross-platform mobile framework

  • 358