Skip to main content
Why Flutter
Randal L. Schwartz (Dart/Flutter GDE) on 2023-08-17
Why Flutter should be your next UI SDK for all platforms
Overview
• What is Flutter?
• What does Flutter do?
• What experience does a developer need?
• What kinds of apps can we build?
• What makes Flutter unique?
• Why Dart?
• Notable Adopters
The evolution away from vendor lock-in
• Some of us are old enough to remember ancient operating systems…
• … that were provided by the vendor
• … and generally closed source (with a few exceptions)
• Then came the FLOSS revolution: the BSDs and Linux and others
• Customers could
f
ix, extend, and modify the OS, or port it to new hardware
• And share their code freely with others
• But more importantly: write once for Linux, run on extremely varied hardware
• Scaling to meet the needs from single-board micro devices to supercomputers
• Linux became the open-source API for cross-platform portability
The Mobile Story
• For over a decade, the smartphone vendors have been like the early computer vendors
• Phone apps had to be written with:
• vendor-supplied toolchains that varied between platforms
• vendor-chosen languages that varied between platforms
• APIs that varied greatly, even from release to release
• vendor-developed, closed-source widgets and gestures
• Releasing for both iOS and Android required specialized skills, or separate teams
• And never quite looked or acted the same on both platforms
• Then, along came Flutter, and suddenly the game has changed!
Flutter
• Flutter is a mobile app SDK, complete with framework, engine, widgets,
and tools
• Gives developers easy and productive way to build and deploy beautiful
apps
• Currently, in production release for iOS, Android, and web
• And desktop for Mac, Linux, and Windows
• Dart (Flutter’s language) can be used to build web and server applications
• Learn Dart once, develop for eight platforms
What does Flutter do?
• For users:
• Beautiful app UIs come to life
• For developers:
• Lowers the bar to entry for building mobile apps
• Speeds up the development cycle (hot reload, more on that later)
• Reduces the cost and complexity of app production across platforms
• Permits a single mobile app dev team for both iOS and Android
• For designers:
• Helps deliver original design vision without compromises
• Productive prototyping tool (rapid changes without long compile cycle)
What experience does a developer need?
• Flutter uses Dart as the primary development language
• Modern strongly-typed language with familiar constructs:
• Classes, methods, variables
• Complex data structures with generics, type inference, tuples
• Imperative programming (loops, conditionals, pattern matching)
• Functional programming (streams, immutable objects, list comprehensions)
• No prior mobile experience required
• Heck, even yours truly is doing mobile development now!
• Even people with very little programming experience seem to be productive rapidly
What kinds of apps can we build with
f
lutter?
• Optimized for 2D mobile apps that want to run on everything with a display
• Some 3D is being slowly introduced
• Capable of “brand-
f
irst” designs
• Also mimics “stock platform” look and feel
• Full featured apps including native services:
• camera
• geolocation
• network
• storage
• sensors
• bluetooth
• NFC
• and more!
Who makes and uses Flutter?
• Open-source project (hosted on github)
• Originally developed and still heavily supported by Google
• Community contributions as well
• Google uses Flutter to build business-critical apps for iOS and Android:
• Mobile Sales Tool
• Store Manager for Google Shopping Express
• And growing number of internal projects
• Nearly a million apps already deployed by third parties
What makes Flutter unique?
• Flutter does not use WebView or the OEM widgets!
• No penalty crossing between inputs, app code and rendering engine
• Flutter uses Skia from Chrome (and soon, Impeller) to render its own widgets
• The widgets are all written in Dart
• Thin layer of C++ to talk to native APIs, with JNI and FFI support
• Dart code also handles compositing, gestures, animation, frameworks, and so on
• Code is easily inspectable, patchable, extendable
• Cross-platform look and feel easily provided
• or customized per platform for native feel
• Design packages available for Windows, Linux, Mac desktop, and custom
Why Dart?
• Google mobile team chose Dart based on numerous criteria
• Two critical features:
• A JIT-based fast development cycle for shape changing and stateful hot reloads
• AOT compiler that emits ef
f
icient ARM code for fast startup and predictable speed
• Can also re-use most code in Pub (except those that depend on dart:io or dart:html)
• Flutter team has in
f
luenced Dart development
• AOT compiler (produce native binaries more directly)
• Optimizing VM for latency rather than throughput
• Strong mode (sound type system)
Notable Adopters
Summing it up: Why Flutter?
• The advantages of reactive views, with no JavaScript bridge
• Fast, smooth, and predictable; code compiles AOT to native (ARM) code
• The developer has full control over the widgets and layout
• Comes with beautiful, customizable widgets
• Great developer tools, with amazing hot reload
• More performant, more compatibility, more fun
• And, by the way, you can develop for many platforms from one code base
• But that’s insigni
f
icant compared to the other gains!
For more information
• Dart language: dart.dev
• Includes language tour (mandatory!) and library tour (at least skim)
• Flutter framework:
f
lutter.dev
• Tutorials
• Descriptions of widget classes
• Cookbook
• Codelabs
• Full API descriptions
• Support:
f
lutter.dev/community (join Slack and Discord from there)
Recommended YouTube Channels
• Mine, of course: https://www.youtube.com/@RandalOnDartAndFlutter
• Flutter of
f
icial: https://www.youtube.com/@
f
lutterdev
• Flutter Community: https://www.youtube.com/@FlutterCommunity