The magic of flutter

30
The Magic of Flutter AMahdy Abdelaziz Developer Advocate @ Vaadin amahdy.net @amahdy7

Transcript of The magic of flutter

Page 1: The magic of flutter

The Magic of FlutterAMahdy AbdelazizDeveloper Advocate @ Vaadinamahdy.net@amahdy7

Page 2: The magic of flutter

What is Flutter?

A SDK that makes building high-performing, modern and beautiful apps easy

Works for both Android and iOS

An open-source toolkit, developed by Google*

100+ contributions from the open source community

* Currently in Alpha

Page 3: The magic of flutter

Who is Flutter for?

Designers that care about a brand-driven experience on Android and iOS

Prototypers get a high-fidelity and fast way to build working prototypes.

Developers benefit from fantastic developer tools, an easy-to-use language, a rich set of widgets and great IDE support. Flutter frees up valuable time for working on features and delightful experiences.

Page 4: The magic of flutter

1. Developer Experience2. Performance

Page 5: The magic of flutter

Design-orientedDevelopment Flow

Page 6: The magic of flutter

What do you see here?

Page 7: The magic of flutter

Diagram the Layout- Look for rows and columns- Is there a grid?- Any overlapping elements?- Do we need tabs?- Padding, alignment or borders needed?

Page 8: The magic of flutter

Designing bottom up

Page 9: The magic of flutter

HTML/CSS Analogs in Fluttervar container = new Container( // grey box

child: new Text(

"Lorem ipsum",

style: new TextStyle(

fontSize: 24.0

fontWeight: FontWeight.w900,

fontFamily: "Georgia",

),

),

width: 320.0,

height: 240.0,

color: Colors.grey[300],

);

<div class="greybox">

Lorem ipsum

</div>

.greybox {

background-color: #e0e0e0; /* grey 300 */

width: 320px;

height: 240px;

font: 900 24px Georgia;

}

Page 10: The magic of flutter

Efficient Tooling

Page 11: The magic of flutter

$ flutter doctor

Checks your environment and displays a report to the terminal window

$ flutter upgrade

Updates both the Flutter SDK and your packages

Page 12: The magic of flutter

Hot Reload

Injecting updated source code files into the running Dart VM

Stateful: App state is retained after a reload.

Quickly iterate on a screen deeply nested in your app

Page 13: The magic of flutter
Page 14: The magic of flutter

Dart Observatory

Statement-level single-stepping debugger and profiler

Automatically running when you start your app using flutter run

See which lines of code have executed

Check out memory allocations

Debug memory leaks & fragmentation

Page 15: The magic of flutter

The Power of Widgets

Page 16: The magic of flutter

Great looking and fast Widgets

Page 17: The magic of flutter

Everything is a Widget

Page 18: The magic of flutter

Platform Channels

Page 19: The magic of flutter

Using platform channels allows for receiving method calls and sending back results

Page 20: The magic of flutter

Optimized for Performance

Page 21: The magic of flutter

- Compiles to Native Code- No reliance on OEM widgets- No bridge needed- Structural Repainting

Page 22: The magic of flutter

Superpowered by Dart

Page 23: The magic of flutter

- A single codebase for Android and iOS

- Rapid development cycles- Great tooling

Page 24: The magic of flutter

Setup

Page 25: The magic of flutter

flutter.io/setup

Page 26: The magic of flutter

$ flutter create **appname**

Page 27: The magic of flutter

$ flutter run

Page 28: The magic of flutter

flutter.io/setup

$ flutter create **appname**

$ flutter run

https://codelabs.developers.google.com/codelabs/flutter/

Page 29: The magic of flutter

Additional resources

Blog What’s Revolutionary about Flutter by Wm Leler: goo.gl/bZcFR9

Video Flutter's Rendering Pipeline by Adam Barth: youtu.be/UUfXWzp0-DU

Video The Mahogany Staircase by Ian Hickson: youtu.be/dkyY9WCGMi0

And of course: github.com/flutter & flutter.io

Page 30: The magic of flutter

Thank you!AMahdy AbdelazizDeveloper Advocate @ Vaadinamahdy.net@amahdy7