SlideShare a Scribd company logo
Flutter
mobile guild
#cododajnia
Bartosz Kosarzycki
@bkosarzycki
What is Flutter?
- multi-platform - Android & iOS
- high performance, low latency
- DART as main language
- open-source / github
- “flutter” frame render / rapid variation of signal parameters
- not a monolith structure
access to, and control over, all layers of the system
- custom ui-rendering engine
What’s more?
- material design on iPhones
- drawer, FAB implementation
on iPhones
- change iphone/android behaviour style dynamically
- iPhone navigation style on Android
- hot reload of classes
https://www.youtube.com/watch?v=iPlPk43RbpA
- AOT compilation for iOS & Android
Architecture
- a heavily optimized, mobile-first 2D rendering engine (with
excellent support for text)
- a functional-reactive framework
- a set of Material Design widgets (which can be extended)
- command-line tools and plugins for IntelliJ IDEA
- highly productive and fast development experience
Architecture
High-level overview
Skia Dart VM Engine
Mojo
Services
Animation Painting
Rendering
Widgets
Material
Gestures
Shell
(C++)
Framework
(Dart)
source: flutter.io
help
help
Technology
- C, C++, Dart, Skia (a 2D rendering engine), Mojo IPC, and Blink’s text rendering system
Compatibility
- Android: Jelly Bean, v16, 4.1.x or newer,
- iPhone: iOS 8 or newer
- emulator /simulator
Performance
- constant 60 fps
BSD license
slimmed down
graphics stack
from CHROME
slimmed down
graphics stack
from ANDROID
Actively in use
at Google
2 million lines of production
code in use
since 2011
JavaScript
DART
Scala
Java
TypeScript
Language features
- dynamically typed language with optional types
- dart SDK - includes libraries & command-line tools
- dart VM - online version - dartpad
- dartanalyzer - statically analyzes code, helping you catch errors
early
- pub - package manager
- dart2js - Dart-to-JavaScript compiler
- dartfmt - Dart code formatter
In short...
Getters and setters
class Spacecraft {
DateTime launchDate ;
int get launchYear => launchDate?.year ;
}
flybyObjects.where((name) => name.contains('flower')).forEach(print);
Lambda (fat-arrow) expressions:
Variables & constants:
var name = 'Voyager I';
var year = 1977;
final bar = const [];
const baz = const [];
Functions:
int fibonacci(int n) {
if (n == 0 || n == 1) return n;
return fibonacci(n - 1) + fibonacci(n - 2);
}
Language features
- dart native extensions enable dart to run C/C++ code - check out
- public package repository at https://pub.dartlang.org/packages
package imports:
import 'package:vector_math/vector_math.dart';
- “everything is an object”, even - numbers, functions, and nulls are
objects
- You can create top-level functions and also create functions within
functions
- reified generics support
- mixins
In short...
var future = gatherNewsReports();
future.then((content) => print(content))
.catchError((e) => handleError(e));
Future API:
Mixins:
class Manned {
int astronauts;
void describeCrew() {
print('no. $astronauts');
}
}
class Orbiter extends Spacecraft with Manned {
}
Async await:
String news = await gatherNewsReports();
Future gatherNewsReports() async {
String path = 'https://www.dartlang.org/f/dailyNewsDigest.txt';
return (await HttpRequest.getString(path));
}
Syntax of choice:
‘Scala’ style:
var title = "Long title text";
var title2 = title.substring(5);
‘Java’ style:
String title = "Long title text";
String title2 = title.substring(5);
Everything is an object:
double a = 3.2;
var floor = a.floor();
(floor + 2).abs();
Lamdas & closures:
var addition = () => 2 + 3;
print(addition());
var errorType = "[ERROR]";
var closure = (msg) => errorType + " "
+ msg;
print(closure("Some error"));
Language syntax:
Anonymous functions:
var list = ['iPhone', 'Android'];
list.forEach((i) {
print(list.indexOf(i).toString() + ': ' + i);
});
Type checking:
if (a is AndroidPhone) {
a.macAddress = '00-14-22-01-23-45';
}
Reified generics:
Generics are kept at runtime
var names = new List<String>();
names.addAll(['Seth', 'Kathy', 'Lars']);
//check at runtime
print(names is List<String>);
Parameterized types with constructors
var names = new List<String>();
var nameSet = new Set<String>.from(names);
Reified generics:
Generics methods
class Foo<E> {
E _item;
<T> T transform(T fn(E)) {
return fn(_item);
}
}
STILL IN DEVELOPMENT
(as of Nov, 2016)
https://github.com/dart-lang/sdk/issues/254
class B<C> {
C create() {
return new C();
}
}
New instance
Optional types in dart
- dart language is dynamically typed
- it is possible to add type annotations to programs
- incomplete or plain wrong type annotations DO NOT prevent
compilation
- variables with no specified type get a special type: dynamic
Type annotations give a couple of benefits, however:
- Documentation for humans, name completion and improved
navigation in IDEs, static checker warns you about potential
problems
- more info: here
Loading libraries
- Importing only part of a library
import 'package:lib1/lib1.dart' show foo;
- Lazily loading a library
import 'package:deferred/hello.dart' deferred as hello;
await hello.loadLibrary();
PUB package manager
File name:
/pubspec.yaml
$ cd /Users/bko/repos/abcrepo
$ pub get
IDEs
Also:
Material design
Books
Tools
- gitignore file - .gitignore
- environment variables
.gitignore:
$ nano ~/.bash_profile
flutter pub dart dart2js dartanalyzer etc...
Project checkout /
get dependencies
- pub get
Run the application
- open iPhone simulator / Android emulator
- check connected devices
Run the application
- run in debug mode
- install the app
- run in ‘release’ mode (not supported for emulators)
- run on a specific device
Run the application
- run lint analysis
- run tests
Platforms comparison
Using resources
- to add an image edit flutter.yaml file
- add image file to the project:
App icon
iPhone Android
UI ThreadGraphics Pipeline
Dart VM
GPU Thread
Compositor
Skia
GPU
GL commands
Layer Tree
Vsync
GPU
Throttle
source: flutter.io
Rendering Pipeline
Animate
Build
Layout
Paint
Tick animations to change widget state
Rebuild widgets to account for state changes
Update size and position of render objects
Record display lists for composited layers
Vsync
GPU
Layer Tree
source: flutter.io
StatelessComponent
constructor
build
StatefulComponent
constructor
createState
A single StatelessComponent can
build in many different BuildContexts
A StatefulComponent creates a new
State instance for each BuildContext
source: flutter.io
Links
- Dart language articles: https://www.dartlang.org/articles/language
- Online Dartpad: https://dartpad.dartlang.org/
- Style, Usage, Design
- Dart academy: https://dart.academy/
- Beginners: part1, part2
- Dart news: http://news.dartlang.org/
- Flutter layered design: https://www.youtube.com/watch?v=dkyY9WCGMi0
- Sky (previous version): https://www.youtube.com/watch?v=PnIWl33YMwA
Thank you!
QUESTIONS
Bartosz Kosarzycki
@bkosarzycki

More Related Content

What's hot

Mobile development with Flutter
Mobile development with FlutterMobile development with Flutter
Mobile development with Flutter
Awok
 
Building beautiful apps using google flutter
Building beautiful apps using google flutterBuilding beautiful apps using google flutter
Building beautiful apps using google flutter
Ahmed Abu Eldahab
 
Flutter UI Framework
Flutter UI FrameworkFlutter UI Framework
Flutter UI Framework
Yuliia Makarenko
 
Flutter Intro
Flutter IntroFlutter Intro
Flutter Intro
Vladimir Parfenov
 
Flutter
FlutterFlutter
flutter.school #HelloWorld
flutter.school #HelloWorldflutter.school #HelloWorld
flutter.school #HelloWorld
Frederik Schweiger
 
Flutter
FlutterFlutter
Flutter
Mohit Sharma
 
Introduction to Flutter
Introduction to FlutterIntroduction to Flutter
Introduction to Flutter
Apoorv Pandey
 
Developing Cross platform apps in flutter (Android, iOS, Web)
Developing Cross platform apps in flutter (Android, iOS, Web)Developing Cross platform apps in flutter (Android, iOS, Web)
Developing Cross platform apps in flutter (Android, iOS, Web)
Priyanka Tyagi
 
What is Flutter
What is FlutterWhat is Flutter
What is Flutter
Malan Amarasinghe
 
Flutter beyond hello world
Flutter beyond hello worldFlutter beyond hello world
Flutter beyond hello world
Ahmed Abu Eldahab
 
What and Why Flutter? What is a Widget in Flutter?
What and Why Flutter? What is a Widget in Flutter?What and Why Flutter? What is a Widget in Flutter?
What and Why Flutter? What is a Widget in Flutter?
MohammadHussain595488
 
Flutter introduction
Flutter introductionFlutter introduction
Flutter introduction
Võ Duy Tuấn
 
Flutter
Flutter Flutter
Flutter
Mohit Nainwal
 
Flutter workshop
Flutter workshopFlutter workshop
Flutter workshop
Vishnu Suresh
 
Flutter Tutorial For Beginners | Edureka
Flutter Tutorial For Beginners | EdurekaFlutter Tutorial For Beginners | Edureka
Flutter Tutorial For Beginners | Edureka
Edureka!
 
Build beautiful native apps in record time with flutter
Build beautiful native apps in record time with flutterBuild beautiful native apps in record time with flutter
Build beautiful native apps in record time with flutter
RobertLe30
 
DSC IIITL Flutter Workshop
DSC IIITL Flutter WorkshopDSC IIITL Flutter Workshop
DSC IIITL Flutter Workshop
DSCIIITLucknow
 
Flutter
FlutterFlutter
Flutter
Ankit Kumar
 
Flutter: Future of App Development
Flutter: Future of App DevelopmentFlutter: Future of App Development
Flutter: Future of App Development
9 series
 

What's hot (20)

Mobile development with Flutter
Mobile development with FlutterMobile development with Flutter
Mobile development with Flutter
 
Building beautiful apps using google flutter
Building beautiful apps using google flutterBuilding beautiful apps using google flutter
Building beautiful apps using google flutter
 
Flutter UI Framework
Flutter UI FrameworkFlutter UI Framework
Flutter UI Framework
 
Flutter Intro
Flutter IntroFlutter Intro
Flutter Intro
 
Flutter
FlutterFlutter
Flutter
 
flutter.school #HelloWorld
flutter.school #HelloWorldflutter.school #HelloWorld
flutter.school #HelloWorld
 
Flutter
FlutterFlutter
Flutter
 
Introduction to Flutter
Introduction to FlutterIntroduction to Flutter
Introduction to Flutter
 
Developing Cross platform apps in flutter (Android, iOS, Web)
Developing Cross platform apps in flutter (Android, iOS, Web)Developing Cross platform apps in flutter (Android, iOS, Web)
Developing Cross platform apps in flutter (Android, iOS, Web)
 
What is Flutter
What is FlutterWhat is Flutter
What is Flutter
 
Flutter beyond hello world
Flutter beyond hello worldFlutter beyond hello world
Flutter beyond hello world
 
What and Why Flutter? What is a Widget in Flutter?
What and Why Flutter? What is a Widget in Flutter?What and Why Flutter? What is a Widget in Flutter?
What and Why Flutter? What is a Widget in Flutter?
 
Flutter introduction
Flutter introductionFlutter introduction
Flutter introduction
 
Flutter
Flutter Flutter
Flutter
 
Flutter workshop
Flutter workshopFlutter workshop
Flutter workshop
 
Flutter Tutorial For Beginners | Edureka
Flutter Tutorial For Beginners | EdurekaFlutter Tutorial For Beginners | Edureka
Flutter Tutorial For Beginners | Edureka
 
Build beautiful native apps in record time with flutter
Build beautiful native apps in record time with flutterBuild beautiful native apps in record time with flutter
Build beautiful native apps in record time with flutter
 
DSC IIITL Flutter Workshop
DSC IIITL Flutter WorkshopDSC IIITL Flutter Workshop
DSC IIITL Flutter Workshop
 
Flutter
FlutterFlutter
Flutter
 
Flutter: Future of App Development
Flutter: Future of App DevelopmentFlutter: Future of App Development
Flutter: Future of App Development
 

Viewers also liked

ADG Poznań - Kotlin for Android developers
ADG Poznań - Kotlin for Android developersADG Poznań - Kotlin for Android developers
ADG Poznań - Kotlin for Android developers
Bartosz Kosarzycki
 
Android antipatterns
Android antipatternsAndroid antipatterns
Android antipatterns
Bartosz Kosarzycki
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requests
Bartosz Kosarzycki
 
Dart
DartDart
Introduction to Dart
Introduction to DartIntroduction to Dart
Introduction to Dart
Ramesh Nair
 
How to build a Dart and Firebase app in 30 mins
How to build a Dart and Firebase app in 30 minsHow to build a Dart and Firebase app in 30 mins
How to build a Dart and Firebase app in 30 mins
Jana Moudrá
 
Introduction to the Dart language
Introduction to the Dart languageIntroduction to the Dart language
Introduction to the Dart language
Jana Moudrá
 
JavaScript, Dart, TypeScript & CoffeeScript Comparison
JavaScript, Dart, TypeScript & CoffeeScript ComparisonJavaScript, Dart, TypeScript & CoffeeScript Comparison
JavaScript, Dart, TypeScript & CoffeeScript Comparison
Haim Michael
 
Kotlin Developer Starter in Android projects
Kotlin Developer Starter in Android projectsKotlin Developer Starter in Android projects
Kotlin Developer Starter in Android projects
Bartosz Kosarzycki
 
Gitlab flow
Gitlab flowGitlab flow
Gitlab flow
viniciusban
 
Kotlin advanced - language reference for android developers
Kotlin advanced - language reference for android developersKotlin advanced - language reference for android developers
Kotlin advanced - language reference for android developers
Bartosz Kosarzycki
 
Gitlab flow solo
Gitlab flow soloGitlab flow solo
Gitlab flow solo
viniciusban
 
Flúter auricular común
Flúter auricular comúnFlúter auricular común
Flúter auricular común
Eduardo Ricardo Cano Luján
 
TypeScript, Dart, CoffeeScript and JavaScript Comparison
TypeScript, Dart, CoffeeScript and JavaScript ComparisonTypeScript, Dart, CoffeeScript and JavaScript Comparison
TypeScript, Dart, CoffeeScript and JavaScript Comparison
Haim Michael
 
Structured Apps with Google Dart
Structured Apps with Google DartStructured Apps with Google Dart
Structured Apps with Google Dart
Jermaine Oppong
 
Daggerate your code - Write your own annotation processor
Daggerate your code - Write your own annotation processorDaggerate your code - Write your own annotation processor
Daggerate your code - Write your own annotation processor
Bartosz Kosarzycki
 
Dart como alternativa a TypeScript (Codemotion 2016)
Dart como alternativa a TypeScript (Codemotion 2016)Dart como alternativa a TypeScript (Codemotion 2016)
Dart como alternativa a TypeScript (Codemotion 2016)
Rafael Bermúdez Míguez
 

Viewers also liked (18)

ADG Poznań - Kotlin for Android developers
ADG Poznań - Kotlin for Android developersADG Poznań - Kotlin for Android developers
ADG Poznań - Kotlin for Android developers
 
Android antipatterns
Android antipatternsAndroid antipatterns
Android antipatterns
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requests
 
Dart
DartDart
Dart
 
Introduction to Dart
Introduction to DartIntroduction to Dart
Introduction to Dart
 
How to build a Dart and Firebase app in 30 mins
How to build a Dart and Firebase app in 30 minsHow to build a Dart and Firebase app in 30 mins
How to build a Dart and Firebase app in 30 mins
 
Introduction to the Dart language
Introduction to the Dart languageIntroduction to the Dart language
Introduction to the Dart language
 
JavaScript, Dart, TypeScript & CoffeeScript Comparison
JavaScript, Dart, TypeScript & CoffeeScript ComparisonJavaScript, Dart, TypeScript & CoffeeScript Comparison
JavaScript, Dart, TypeScript & CoffeeScript Comparison
 
Kotlin Developer Starter in Android projects
Kotlin Developer Starter in Android projectsKotlin Developer Starter in Android projects
Kotlin Developer Starter in Android projects
 
Gitlab flow
Gitlab flowGitlab flow
Gitlab flow
 
Kotlin advanced - language reference for android developers
Kotlin advanced - language reference for android developersKotlin advanced - language reference for android developers
Kotlin advanced - language reference for android developers
 
Gitlab flow solo
Gitlab flow soloGitlab flow solo
Gitlab flow solo
 
Flutter
FlutterFlutter
Flutter
 
Flúter auricular común
Flúter auricular comúnFlúter auricular común
Flúter auricular común
 
TypeScript, Dart, CoffeeScript and JavaScript Comparison
TypeScript, Dart, CoffeeScript and JavaScript ComparisonTypeScript, Dart, CoffeeScript and JavaScript Comparison
TypeScript, Dart, CoffeeScript and JavaScript Comparison
 
Structured Apps with Google Dart
Structured Apps with Google DartStructured Apps with Google Dart
Structured Apps with Google Dart
 
Daggerate your code - Write your own annotation processor
Daggerate your code - Write your own annotation processorDaggerate your code - Write your own annotation processor
Daggerate your code - Write your own annotation processor
 
Dart como alternativa a TypeScript (Codemotion 2016)
Dart como alternativa a TypeScript (Codemotion 2016)Dart como alternativa a TypeScript (Codemotion 2016)
Dart como alternativa a TypeScript (Codemotion 2016)
 

Similar to Introduction to Flutter - truly crossplatform, amazingly fast

An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
Eric D. Schabell
 
carrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-APIcarrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-API
Yoni Davidson
 
Getting Native with NDK
Getting Native with NDKGetting Native with NDK
Getting Native with NDK
ナム-Nam Nguyễn
 
Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11
Lars Vogel
 
High quality ap is with api platform
High quality ap is with api platformHigh quality ap is with api platform
High quality ap is with api platform
Nelson Kopliku
 
Resume -9 Yrs -Looking for New Opportunity !!
Resume -9 Yrs -Looking for New Opportunity !!Resume -9 Yrs -Looking for New Opportunity !!
Resume -9 Yrs -Looking for New Opportunity !!
Raju Tiwari
 
Standalone Android Apps in Python
Standalone Android Apps in PythonStandalone Android Apps in Python
Standalone Android Apps in PythonBaptiste Lagarde
 
Core Android
Core AndroidCore Android
Core Android
Dominik Helleberg
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to Android
Vlatko Kosturjak
 
"About Firebird and Flamerobin" by Marius Popa @ eLiberatica 2007
"About Firebird and Flamerobin" by Marius Popa @ eLiberatica 2007"About Firebird and Flamerobin" by Marius Popa @ eLiberatica 2007
"About Firebird and Flamerobin" by Marius Popa @ eLiberatica 2007
eLiberatica
 
React native
React nativeReact native
Introduction to Xamarin Mobile Platform
Introduction to Xamarin Mobile PlatformIntroduction to Xamarin Mobile Platform
Introduction to Xamarin Mobile Platform
Dominik Minta
 
Tutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer WorkshopTutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer Workshop
Vivek Krishnakumar
 
Mobile development in 2020
Mobile development in 2020 Mobile development in 2020
Mobile development in 2020
Bogusz Jelinski
 
Making a Headless Android Device (Oslo Embedded Meetup 2018)
Making a Headless Android Device (Oslo Embedded Meetup 2018)Making a Headless Android Device (Oslo Embedded Meetup 2018)
Making a Headless Android Device (Oslo Embedded Meetup 2018)
Patricia Aas
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
Diego Freniche Brito
 
Android Developer Meetup
Android Developer MeetupAndroid Developer Meetup
Android Developer Meetup
Medialets
 
Raju Tiwari-Resume-8+
Raju Tiwari-Resume-8+Raju Tiwari-Resume-8+
Raju Tiwari-Resume-8+Raju Tiwari
 
Understanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profitUnderstanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profit
Pascal Rapicault
 

Similar to Introduction to Flutter - truly crossplatform, amazingly fast (20)

An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
 
carrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-APIcarrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-API
 
Getting Native with NDK
Getting Native with NDKGetting Native with NDK
Getting Native with NDK
 
Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11
 
High quality ap is with api platform
High quality ap is with api platformHigh quality ap is with api platform
High quality ap is with api platform
 
Resume -9 Yrs -Looking for New Opportunity !!
Resume -9 Yrs -Looking for New Opportunity !!Resume -9 Yrs -Looking for New Opportunity !!
Resume -9 Yrs -Looking for New Opportunity !!
 
Standalone Android Apps in Python
Standalone Android Apps in PythonStandalone Android Apps in Python
Standalone Android Apps in Python
 
Core Android
Core AndroidCore Android
Core Android
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to Android
 
"About Firebird and Flamerobin" by Marius Popa @ eLiberatica 2007
"About Firebird and Flamerobin" by Marius Popa @ eLiberatica 2007"About Firebird and Flamerobin" by Marius Popa @ eLiberatica 2007
"About Firebird and Flamerobin" by Marius Popa @ eLiberatica 2007
 
React native
React nativeReact native
React native
 
Introduction to Xamarin Mobile Platform
Introduction to Xamarin Mobile PlatformIntroduction to Xamarin Mobile Platform
Introduction to Xamarin Mobile Platform
 
Tutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer WorkshopTutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer Workshop
 
Alvaro Denis Resume
Alvaro Denis ResumeAlvaro Denis Resume
Alvaro Denis Resume
 
Mobile development in 2020
Mobile development in 2020 Mobile development in 2020
Mobile development in 2020
 
Making a Headless Android Device (Oslo Embedded Meetup 2018)
Making a Headless Android Device (Oslo Embedded Meetup 2018)Making a Headless Android Device (Oslo Embedded Meetup 2018)
Making a Headless Android Device (Oslo Embedded Meetup 2018)
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
 
Android Developer Meetup
Android Developer MeetupAndroid Developer Meetup
Android Developer Meetup
 
Raju Tiwari-Resume-8+
Raju Tiwari-Resume-8+Raju Tiwari-Resume-8+
Raju Tiwari-Resume-8+
 
Understanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profitUnderstanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profit
 

More from Bartosz Kosarzycki

Droidcon Summary 2021
Droidcon Summary 2021Droidcon Summary 2021
Droidcon Summary 2021
Bartosz Kosarzycki
 
Droidcon Online 2020 quick summary
Droidcon Online 2020 quick summaryDroidcon Online 2020 quick summary
Droidcon Online 2020 quick summary
Bartosz Kosarzycki
 
Provider vs BLoC vs Redux
Provider vs BLoC vs ReduxProvider vs BLoC vs Redux
Provider vs BLoC vs Redux
Bartosz Kosarzycki
 
Animations in Flutter
Animations in FlutterAnimations in Flutter
Animations in Flutter
Bartosz Kosarzycki
 
Flutter overview - advantages & disadvantages for business
Flutter overview - advantages & disadvantages for businessFlutter overview - advantages & disadvantages for business
Flutter overview - advantages & disadvantages for business
Bartosz Kosarzycki
 
Flutter CI & Device Farms for Flutter
Flutter CI & Device Farms for FlutterFlutter CI & Device Farms for Flutter
Flutter CI & Device Farms for Flutter
Bartosz Kosarzycki
 
Drone racing - beginner's guide
Drone racing - beginner's guideDrone racing - beginner's guide
Drone racing - beginner's guide
Bartosz Kosarzycki
 
Optimize apps for Chromebooks - Meet.Intive Oct, 2018
Optimize apps for Chromebooks - Meet.Intive Oct, 2018Optimize apps for Chromebooks - Meet.Intive Oct, 2018
Optimize apps for Chromebooks - Meet.Intive Oct, 2018
Bartosz Kosarzycki
 
Android - Gradle build optimisation 3d83f31339d239abcc55f869e5f30348?s=47
Android - Gradle build optimisation  3d83f31339d239abcc55f869e5f30348?s=47Android - Gradle build optimisation  3d83f31339d239abcc55f869e5f30348?s=47
Android - Gradle build optimisation 3d83f31339d239abcc55f869e5f30348?s=47
Bartosz Kosarzycki
 
DroidCon Berlin 2018 summary
DroidCon Berlin 2018 summaryDroidCon Berlin 2018 summary
DroidCon Berlin 2018 summary
Bartosz Kosarzycki
 
SCALA - Functional domain
SCALA -  Functional domainSCALA -  Functional domain
SCALA - Functional domain
Bartosz Kosarzycki
 
Android things introduction - Development for IoT
Android things introduction - Development for IoTAndroid things introduction - Development for IoT
Android things introduction - Development for IoT
Bartosz Kosarzycki
 

More from Bartosz Kosarzycki (12)

Droidcon Summary 2021
Droidcon Summary 2021Droidcon Summary 2021
Droidcon Summary 2021
 
Droidcon Online 2020 quick summary
Droidcon Online 2020 quick summaryDroidcon Online 2020 quick summary
Droidcon Online 2020 quick summary
 
Provider vs BLoC vs Redux
Provider vs BLoC vs ReduxProvider vs BLoC vs Redux
Provider vs BLoC vs Redux
 
Animations in Flutter
Animations in FlutterAnimations in Flutter
Animations in Flutter
 
Flutter overview - advantages & disadvantages for business
Flutter overview - advantages & disadvantages for businessFlutter overview - advantages & disadvantages for business
Flutter overview - advantages & disadvantages for business
 
Flutter CI & Device Farms for Flutter
Flutter CI & Device Farms for FlutterFlutter CI & Device Farms for Flutter
Flutter CI & Device Farms for Flutter
 
Drone racing - beginner's guide
Drone racing - beginner's guideDrone racing - beginner's guide
Drone racing - beginner's guide
 
Optimize apps for Chromebooks - Meet.Intive Oct, 2018
Optimize apps for Chromebooks - Meet.Intive Oct, 2018Optimize apps for Chromebooks - Meet.Intive Oct, 2018
Optimize apps for Chromebooks - Meet.Intive Oct, 2018
 
Android - Gradle build optimisation 3d83f31339d239abcc55f869e5f30348?s=47
Android - Gradle build optimisation  3d83f31339d239abcc55f869e5f30348?s=47Android - Gradle build optimisation  3d83f31339d239abcc55f869e5f30348?s=47
Android - Gradle build optimisation 3d83f31339d239abcc55f869e5f30348?s=47
 
DroidCon Berlin 2018 summary
DroidCon Berlin 2018 summaryDroidCon Berlin 2018 summary
DroidCon Berlin 2018 summary
 
SCALA - Functional domain
SCALA -  Functional domainSCALA -  Functional domain
SCALA - Functional domain
 
Android things introduction - Development for IoT
Android things introduction - Development for IoTAndroid things introduction - Development for IoT
Android things introduction - Development for IoT
 

Recently uploaded

Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
KrzysztofKkol1
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
ayushiqss
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
Peter Caitens
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
MayankTawar1
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
varshanayak241
 

Recently uploaded (20)

Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
 

Introduction to Flutter - truly crossplatform, amazingly fast

  • 2. What is Flutter? - multi-platform - Android & iOS - high performance, low latency - DART as main language - open-source / github - “flutter” frame render / rapid variation of signal parameters - not a monolith structure access to, and control over, all layers of the system - custom ui-rendering engine
  • 3. What’s more? - material design on iPhones - drawer, FAB implementation on iPhones - change iphone/android behaviour style dynamically - iPhone navigation style on Android - hot reload of classes https://www.youtube.com/watch?v=iPlPk43RbpA - AOT compilation for iOS & Android
  • 4. Architecture - a heavily optimized, mobile-first 2D rendering engine (with excellent support for text) - a functional-reactive framework - a set of Material Design widgets (which can be extended) - command-line tools and plugins for IntelliJ IDEA - highly productive and fast development experience
  • 6. High-level overview Skia Dart VM Engine Mojo Services Animation Painting Rendering Widgets Material Gestures Shell (C++) Framework (Dart) source: flutter.io help help
  • 7. Technology - C, C++, Dart, Skia (a 2D rendering engine), Mojo IPC, and Blink’s text rendering system Compatibility - Android: Jelly Bean, v16, 4.1.x or newer, - iPhone: iOS 8 or newer - emulator /simulator Performance - constant 60 fps
  • 8.
  • 9. BSD license slimmed down graphics stack from CHROME slimmed down graphics stack from ANDROID Actively in use at Google 2 million lines of production code in use since 2011
  • 11. Language features - dynamically typed language with optional types - dart SDK - includes libraries & command-line tools - dart VM - online version - dartpad - dartanalyzer - statically analyzes code, helping you catch errors early - pub - package manager - dart2js - Dart-to-JavaScript compiler - dartfmt - Dart code formatter
  • 12. In short... Getters and setters class Spacecraft { DateTime launchDate ; int get launchYear => launchDate?.year ; } flybyObjects.where((name) => name.contains('flower')).forEach(print); Lambda (fat-arrow) expressions: Variables & constants: var name = 'Voyager I'; var year = 1977; final bar = const []; const baz = const []; Functions: int fibonacci(int n) { if (n == 0 || n == 1) return n; return fibonacci(n - 1) + fibonacci(n - 2); }
  • 13. Language features - dart native extensions enable dart to run C/C++ code - check out - public package repository at https://pub.dartlang.org/packages package imports: import 'package:vector_math/vector_math.dart'; - “everything is an object”, even - numbers, functions, and nulls are objects - You can create top-level functions and also create functions within functions - reified generics support - mixins
  • 14. In short... var future = gatherNewsReports(); future.then((content) => print(content)) .catchError((e) => handleError(e)); Future API: Mixins: class Manned { int astronauts; void describeCrew() { print('no. $astronauts'); } } class Orbiter extends Spacecraft with Manned { } Async await: String news = await gatherNewsReports(); Future gatherNewsReports() async { String path = 'https://www.dartlang.org/f/dailyNewsDigest.txt'; return (await HttpRequest.getString(path)); }
  • 15. Syntax of choice: ‘Scala’ style: var title = "Long title text"; var title2 = title.substring(5); ‘Java’ style: String title = "Long title text"; String title2 = title.substring(5); Everything is an object: double a = 3.2; var floor = a.floor(); (floor + 2).abs(); Lamdas & closures: var addition = () => 2 + 3; print(addition()); var errorType = "[ERROR]"; var closure = (msg) => errorType + " " + msg; print(closure("Some error"));
  • 16. Language syntax: Anonymous functions: var list = ['iPhone', 'Android']; list.forEach((i) { print(list.indexOf(i).toString() + ': ' + i); }); Type checking: if (a is AndroidPhone) { a.macAddress = '00-14-22-01-23-45'; }
  • 17. Reified generics: Generics are kept at runtime var names = new List<String>(); names.addAll(['Seth', 'Kathy', 'Lars']); //check at runtime print(names is List<String>); Parameterized types with constructors var names = new List<String>(); var nameSet = new Set<String>.from(names);
  • 18. Reified generics: Generics methods class Foo<E> { E _item; <T> T transform(T fn(E)) { return fn(_item); } } STILL IN DEVELOPMENT (as of Nov, 2016) https://github.com/dart-lang/sdk/issues/254 class B<C> { C create() { return new C(); } } New instance
  • 19. Optional types in dart - dart language is dynamically typed - it is possible to add type annotations to programs - incomplete or plain wrong type annotations DO NOT prevent compilation - variables with no specified type get a special type: dynamic Type annotations give a couple of benefits, however: - Documentation for humans, name completion and improved navigation in IDEs, static checker warns you about potential problems - more info: here
  • 20. Loading libraries - Importing only part of a library import 'package:lib1/lib1.dart' show foo; - Lazily loading a library import 'package:deferred/hello.dart' deferred as hello; await hello.loadLibrary();
  • 21. PUB package manager File name: /pubspec.yaml $ cd /Users/bko/repos/abcrepo $ pub get
  • 24. Books
  • 25. Tools - gitignore file - .gitignore - environment variables .gitignore: $ nano ~/.bash_profile flutter pub dart dart2js dartanalyzer etc...
  • 26. Project checkout / get dependencies - pub get
  • 27. Run the application - open iPhone simulator / Android emulator - check connected devices
  • 28. Run the application - run in debug mode - install the app - run in ‘release’ mode (not supported for emulators) - run on a specific device
  • 29. Run the application - run lint analysis - run tests
  • 31. Using resources - to add an image edit flutter.yaml file - add image file to the project:
  • 33. UI ThreadGraphics Pipeline Dart VM GPU Thread Compositor Skia GPU GL commands Layer Tree Vsync GPU Throttle source: flutter.io
  • 34. Rendering Pipeline Animate Build Layout Paint Tick animations to change widget state Rebuild widgets to account for state changes Update size and position of render objects Record display lists for composited layers Vsync GPU Layer Tree source: flutter.io
  • 35. StatelessComponent constructor build StatefulComponent constructor createState A single StatelessComponent can build in many different BuildContexts A StatefulComponent creates a new State instance for each BuildContext source: flutter.io
  • 36. Links - Dart language articles: https://www.dartlang.org/articles/language - Online Dartpad: https://dartpad.dartlang.org/ - Style, Usage, Design - Dart academy: https://dart.academy/ - Beginners: part1, part2 - Dart news: http://news.dartlang.org/ - Flutter layered design: https://www.youtube.com/watch?v=dkyY9WCGMi0 - Sky (previous version): https://www.youtube.com/watch?v=PnIWl33YMwA