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

Flutter: A New Hope [EXTENDED VERSION]

Flutter: A New Hope [EXTENDED VERSION]

Fde10bcf0813b2162545477be4e7470b?s=128

Eugenio Marletti

October 11, 2017
Tweet

Transcript

  1. A NEW HOPE Eugenio Marletti Flutter & Android GDE, Clue

    EXTENDED VERSION
  2. SDK for building high-performance, high-fidelity, apps for iOS and Android,

    from a single codebase
  3. ALPHA- ish

  4. None
  5. None
  6. QUIZ TIME!

  7. None
  8. None
  9. Open-source language Made by (and for) Google “Familiar” Java-like syntax

    Surprisingly good…?!
  10. (originally) dynamic language Statically checked (strong mode) Mixins, reified generics,

    async (streams!) compile-time constant instances Null handling with .? and ?? Runs in Dart VM, JS or AOT native
  11. FRAMEWORK WIDGETS RENDERING DART:UI DART CUPERTINO MATERIAL ENGINE C++ TEXT

    (BLINK) SKIA
  12. WIDGETS WIDGETS WIDGETS WIDGETS WIDGETS WIDGETS EVERYWHERE WIDGETS EVERYWHERE WIDGETS

    EVERYWHERE WIDGETS EVERYWHERE WIDGETS EVERYWHERE
  13. Composition over inheritance Everything is a widget Declaration and binding

    together
  14. None
  15. Stateless Stateful

  16. Stateless class BoringText extends StatelessWidget { @override Widget build(BuildContext context)

    { return new Text("Hello world") } }
  17. Stateful class Counter extends StatefulWidget { @override _CounterState createState() =>

    new _CounterState(); }
  18. Stateful class _CounterState extends State<Counter> { int _counter = 0;

    void _increment() { setState(() { ++_counter; }); } @override Widget build(BuildContext context) { return new Text("Count: " + _counter); } }
  19. Animations

  20. None
  21. None
  22. None
  23. Unit tests Instrumentation tests Widget tests

  24. Smoooth (60 fps) Performance?

  25. Full control No OEM customisation Always up to date Inspect

    real source code which will be run Minimal Apk size: 8MB
  26. Development experience

  27. $ flutter doctor [✓] Flutter (on Mac OS X 10.12.4

    16E195, channel unknown) • Flutter at /Users/takhion/flutter • Framework revision 031e042eee (3 weeks ago), 2017-03-17 15:24:54 • Engine revision c4edec7417 • Tools Dart version 1.23.0-dev.9.0 [✓] Host Executable Compatibility • Downloaded executables execute on host [✓] Android toolchain - develop for Android devices (Android SDK 25.0.2) • Android SDK at /Users/takhion/Android/sdk • Platform android-25, build-tools 25.0.2 • ANDROID_HOME = /Users/takhion/Android/sdk • Java binary at: /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java • Java version: Java(TM) SE Runtime Environment (build 1.8.0_25-b17) [✓] iOS toolchain - develop for iOS devices (Xcode 8.2.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 8.2.1, Build version 8C1002 • ios-deploy 1.9.1 • CocoaPods version 1.2.0 [✓] Android Studio (version 2.2) • Android Studio at /Applications/Android Studio.app/Contents • Gradle version 2.14.1 [✓] Connected devices • Pixel • FA69N0309825 • android-arm • Android 7.1.1 (API 25)
  28. Full control

  29. $ flutter run Launching lib/main.dart on Pixel in debug mode...

    Running 'gradle assembleDebug'... Built build/app/outputs/apk/app-debug.apk (21.8MB). Uninstalling old version... Installing build/app/outputs/apk/app.apk... 6.0s Syncing files to device... 2.8s ! To hot reload your app on the fly, press "r". To restart the app entirely, press "R". The Observatory debugger and profiler is available at: http://127.0.0.1:8106/ For a more detailed help message, press "h". To quit, press "q".
  30. None
  31. Full control

  32. Full control

  33. API 16+ ARM only iOS 8+ 64 bit (iPhone 5S+)

  34. flutter.io github.com/rock3r/squanchy-flutter bit.ly/flutter-a-new-hope-extended

  35. @workingkills Eugenio Marletti