Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How I met Flutter

Roberto Orgiu
September 26, 2017

How I met Flutter

Slides of my introductory talk about Flutter, kept at Droidcon NYC 2017

Roberto Orgiu

September 26, 2017
Tweet

More Decks by Roberto Orgiu

Other Decks in Technology

Transcript

  1. Engine Framework and apps SKIA DART TEXT FOUNDATION ANIMATION PAINTING

    GESTURES RENDERING WIDGETS MATERIAL CUPERTINO
  2. class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.title}) : super(key:

    key); final String title; @override _MyHomePageState createState() => new _MyHomePageState(); }
  3. class _MyHomePageState extends State<MyHomePage> { int _counter = 0; void

    _incrementCounter() { setState(() { _counter++; }); } @override Widget build(BuildContext context) { ... }
  4. @override Widget build(BuildContext context) { return new Scaffold( appBar: new

    AppBar( title: new Text(widget.title), ), body: new Center( child: new Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ new Text( 'You have pushed the button this many times:', ), new Text( '${_counter}', style: Theme.of(context).textTheme.display1, ), ],
  5. @override Widget build(BuildContext context) { return new Scaffold( appBar: new

    AppBar( title: new Text(widget.title), ), body: new Center( child: new Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ new Text( 'You have pushed the button this many times:', ), new Text( '${_counter}', style: Theme.of(context).textTheme.display1, ), ],
  6. @override Widget build(BuildContext context) { return new Scaffold( appBar: new

    AppBar( title: new Text(widget.title), ), body: new Center( child: new Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ new Text( 'You have pushed the button this many times:', ), new Text( '${_counter}', style: Theme.of(context).textTheme.display1, ), ],
  7. @override Widget build(BuildContext context) { return new Scaffold( appBar: new

    AppBar( title: new Text(widget.title), ), body: new Center( child: new Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ new Text( 'You have pushed the button this many times:', ), new Text( '${_counter}', style: Theme.of(context).textTheme.display1, ), ],
  8. @override Widget build(BuildContext context) { return new Scaffold( appBar: new

    AppBar( title: new Text(widget.title), ), body: new Center( child: new Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ new Text( 'You have pushed the button this many times:', ), new Text( '${_counter}', style: Theme.of(context).textTheme.display1, ), ],
  9. @override Widget build(BuildContext context) { return new Scaffold( appBar: new

    AppBar( title: new Text(widget.title), ), body: new Center( child: new Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ new Text( 'You have pushed the button this many times:', ), new Text( '${_counter}', style: Theme.of(context).textTheme.display1, ), ],
  10. @override Widget build(BuildContext context) { return new Scaffold( appBar: new

    AppBar( title: new Text(widget.title), ), body: new Center( child: new Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ new Text( 'You have pushed the button this many times:', ), new Text( '${_counter}', style: Theme.of(context).textTheme.display1, ), ],
  11. new Text( 'You have pushed the button this many times:',

    ), new Text( '${_counter}', style: Theme.of(context).textTheme.display1, ), ], ), ), floatingActionButton: new FloatingActionButton( onPressed: _incrementCounter, tooltip: 'Increment', child: new Icon(Icons.add), ), ); }
  12. new Text( 'You have pushed the button this many times:',

    ), new Text( '${_counter}', style: Theme.of(context).textTheme.display1, ), ], ), ), floatingActionButton: new FloatingActionButton( onPressed: _incrementCounter, tooltip: 'Increment', child: new Icon(Icons.add), ), ); }
  13. class Page2 extends StatefulWidget { Page2({Key key, this.title}) : super(key:

    key); static const String routeName = "/Page2"; final String title; @override _Page2State createState() => new _Page2State(); }
  14. class Page2 extends StatefulWidget { Page2({Key key, this.title}) : super(key:

    key); static const String routeName = "/Page2"; final String title; @override _Page2State createState() => new _Page2State(); }
  15. class MyApp extends StatelessWidget { @override Widget build(BuildContext context) {

    return new MaterialApp( title: 'Hello Flutter', theme: new ThemeData( primarySwatch: Colors.red, accentColor: Colors.blueAccent), home: new MyHomePage(title: ‘…’), ); } }
  16. class MyApp extends StatelessWidget { @override Widget build(BuildContext context) {

    var routes = <String, WidgetBuilder>{ Page2.routeName: (BuildContext context) => new Page2(title: "Page2") }; return new MaterialApp( title: 'Hello Flutter', theme: new ThemeData( primarySwatch: Colors.red, accentColor: Colors.blueAccent), home: new MyHomePage(title: ‘…’), routes: routes, ); } }