Flutter

František Gažo

First impressions...

@franky on

What is Flutter?

  • mobile app SDK - Android & iOS
  • developed by Google
  • DART
  • open-source on GitHub
  • still alpha

Cross-platform frameworks

  • WebView based - PhoneGap, Apache Cordova, Ionic, ...
  • React Native
  • Flutter

Why Flutter?

  • IDE plugins
  • hot reload
  • compatibility - Android 4.1+, iOS 8.0+
  • AOT to native code
  • full control over the widgets
  • provides beautiful, customizable widgets
  • single codebase

Findings...

Setup

 

  • flutter doctor
    
  • flutter create app_name 
       [-a kotlin -i swift -org my.package.name]
  • flutter run [--release]
  • flutter devices

Channels

Cross-platform libs = Plugins

Localization

  • flutter_localization
    • simple solution
  • intl & intl_translation
    • gender, plural, fallback to default language

 

https://flutter.io/tutorials/internationalization/

Testing

 

  • IDE alebo $ flutter test

Video

Reflection vs Code Generation

  • reflection is not supported
    • all libs use code generation
  • dart tree-shaking
    • include large lib, use only what you need

API

Resources

Build Flavors

  • define in each platform
  • propagate through a channel (no plugin yet)
    • no flavor specific code/asset directory support

 

$ flutter run --flavor free
$ flutter run --flavor paid

Debugging & Profiling

  • open flutter project in AndroidStudio (IntelliJ)
    • flutter plugin adds:
      • toggle platform, slow animation, debug paint, performance overlay, widget hierarchy
    • dart only debugging
    • AndroidStudio profiler is hidden
  • open android part in AndroidStudio / iOS in Xcode

Background processing

Logging

WebView support

Cons

More

Thanks

Made with Slides.com