what is flutter and why should i care?

28
What is Flutter? and why should I care?

Upload: sergi-martinez

Post on 29-Jan-2018

159 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: What is flutter and why should i care?

What is Flutter? and why should I care?

Page 2: What is flutter and why should i care?

About me

Sergi Martínez@sergiandreplace

Android GDE & dev at Schibsted Spain

Page 3: What is flutter and why should i care?

Disclaimer: I’m a fanboy

Page 4: What is flutter and why should i care?

What is Flutter?

Page 5: What is flutter and why should i care?

A new multiplatform mobile development SDK based on Dart with inspiration on React

Page 6: What is flutter and why should i care?
Page 7: What is flutter and why should i care?

A new open source multiplatform mobile development SDK based on Dart with inspiration on React

First alpha release on Christmas 2015

But gaining traction this year

Still in alpha*

Page 8: What is flutter and why should i care?

A new open source multiplatform mobile development SDK based on Dart with inspiration on React

https://github.com/flutter/flutter

Page 9: What is flutter and why should i care?

A new open source multiplatform mobile development SDK based on Dart with inspiration on React

Same source code for both Android and iOS

Material + Cupertino

Native plugins

Page 10: What is flutter and why should i care?
Page 11: What is flutter and why should i care?

A new open source multiplatform mobile development SDK based on Dart with inspiration on React

Created by Google as a JS transpilation language

Widely used at Google

Javascript-ish enough to start using it

Page 12: What is flutter and why should i care?

A new open source multiplatform mobile development SDK based on Dart with inspiration on React

CompareUpdate

diffRealDOM

Virtual DOM

Application UI

Render

Canvas

Events

Page 13: What is flutter and why should i care?

A new open source multiplatform mobile development SDK based on Dart with inspiration on React

WidgetTree

Render

Canvas

Events

Application Platform

Page 14: What is flutter and why should i care?
Page 15: What is flutter and why should i care?

How to start?

Page 16: What is flutter and why should i care?

$ git clone [email protected]:flutter/flutter.git

Page 17: What is flutter and why should i care?

$ flutter doctor

Page 18: What is flutter and why should i care?

Running flutter doctor...[√] Flutter (on Microsoft Windows [Version 10.0.15063], locale en-US, channel master) • Flutter at C:\Users\sergi\dev\flutter\flutter • Framework revision 4e48a737eb (4 weeks ago), 2017-11-06 17:40:13 -0800 • Engine revision d8a0dd2958 • Tools Dart version 1.25.0-dev.11.0

[√] Android toolchain - develop for Android devices (Android SDK 25.0.3) • Android SDK at C:\Users\sergi\AppData\Local\Android\sdk • Platform android-25, build-tools 25.0.3 • Java binary at: C:\Users\sergi\dev\android-studio3rc\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-884-b01)

[√] Android Studio (version 3.0) • Android Studio at C:\Users\sergi\dev\android-studio3rc • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-884-b01)

[√] IntelliJ IDEA Community Edition (version 2017.1) • Flutter plugin version 18.1 • Dart plugin version 171.4424.63

[√] Connected devices • None

Page 19: What is flutter and why should i care?

EditorWith plugin

IntelliJ Idea (CE or Enterprise)

Android Studio

Visual Studio Code

Or anything else using console

Page 20: What is flutter and why should i care?

Sample code

Page 21: What is flutter and why should i care?

import 'package:flutter/material.dart';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp( title: 'Flutter Demo', theme: new ThemeData( primarySwatch: Colors.blue, ), home: new Scaffold( appBar: new AppBar( title: new Text("My App"), ), body: new Center( child: new FlutterLogo(), ), ), ); }}

Page 22: What is flutter and why should i care?

Live demo!

Page 23: What is flutter and why should i care?

Stateless vs Stateful

Page 24: What is flutter and why should i care?

All Widgets are immutable

Page 25: What is flutter and why should i care?

To modify them we need a state that recreates the widget tree

Page 26: What is flutter and why should i care?

Show me!

Page 27: What is flutter and why should i care?

Final thoughts

Page 28: What is flutter and why should i care?

Aaaand questions?

Pssst, check my blog sergiandreplace.comOr my twitter @sergiandreplace