Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

Why I chose Flutter

Why I chose Flutter

Helio S. Junior

December 17, 2018
Tweet

Other Decks in Programming

Transcript

  1. Flutter allows you to build beautiful native apps on iOS

    and Android from a single codebase.
  2. • uses js bridge to run code • JIT (just

    in time) • uses third party e2e tests • no bridge • native typed • hot reload • AOT (ahead of time) • Easy access any native module • 60fps
  3. • not installed (no play store) • harder if needs

    native module not created • Can’t use Bluetooth, NFC and fingerprint scan • Not all browsers • Can’t use notifications on iOS • Can’t use offline on iOS • Can’t use native auth like facebook and google • installed on device • Easy access any native module
  4. What is Dart • Craft awesome UX/UI • ahead-of-time compilation

    • Syntax clear and concise • Compiles to ARM and X86 • Transpiles to JavaScript • Similiar with C++, C# and Java • Reactive <3
  5. Row It Receives children List<Widget> where each element will be

    positioned horizontal You can else align by cross axis, main axis and change the direction of main axis
  6. Column Same of Row Widget but each element will be

    positioned vertical You can else align by cross axis, main axis and change the direction of main axis
  7. Creating first widget (Main widget) MaterialApp class An application that

    uses material design. home is an property of MaterialApp class that receives an Widget that will be loaded as default.
  8. Specifying an class to be executed as app runApp We

    also defines a main function that will run application and send our MyApp
  9. Building the layout Scaffold Class This class help us to

    build an page following the basic structure of an application like Drawer, Body, Bottom Navigation, AppBar, FloatingActionButton
  10. Implementing the action of increment counter _incrementCounter() The secret is

    setState, all changes on variables that are used on layouts will be rebuild so the layout will change.
  11. Unit Tests In addition to make it work you will

    be supposed to add to pubspec.yaml flutter test
  12. Widget Tests You implement a widget test in a similar

    way as a unit test. To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter provides. flutter test
  13. Integration Tests If you are familiar with Selenium/WebDriver (web), Espresso

    (Android) or UI Automation (iOS), then Flutter Driver is Flutter’s equivalent to those integration testing tools. flutter drive --target=my_app/test_driver/user_list_scrolling.dart
  14. How Flutter runs on Android and iOS C/C++ engine compile

    with... NDK LLVM iOS Android Running on.. a-head of time (AOT) Runner This is similar to the way many game engines work.
  15. Cons • core engine 2.77 MB • the framework +

    app code ~ 820 KB • LICENSE 53 KB • classes.dex 62 KB • 450 KB of ICU data ================================= ~ 4.2 MB