Flutter sur desktop Going beyond mobile 1
Qui suis-je ? Pierre Champion @Drakirus Étudiant : IA appliquée au Langage Naturel (NLP) Université du Mans Background Mobile : Cordova Plugins Android Flutter : Drakirus/go-flutter-desktop-embedder 2
Petit Rappel 3
Nouveaux canaux de distribution Flutter for : Android ● ● iOS Linux ● ● Windows OSx ● Exemple d'une application Flutter sur Linux 4
Alternative viable à Electron ? 5
Bénéfique pour le dev mobile Émulateur : Client Flutter Desktop : ● Démarrage lent ● Démarrage rapide ● Fixé à une résolution ● Runtime Redimensionnable RAM ~1 Go RAM ~100 Mo ● ● App size ~700 Mo App size ~20 Mo ● ● Side Note: Development of Cordova plugins is a real pain. 6
Architecture API Developer Shells for : ● Android ● iOS Low level API Embedder API Engine as a library Engine + Embedder = Shell 7
Let's build an simple Embedder ! 8
Compilation Flutter Flutter uses Kernel Snapshot in the development stage. 4 files: isolate_snapshot_data ▪ vm_snapshot_data ▪ platform.dill ▪ kernel_blob.bin 9
Compilation Flutter 10
Flutter desktop requirements ● Target Platform Override 11
Flutter desktop requirements ● Fonts 12
Flutter desktop requirements ● Platform Plugins 13
Flutter application limitations ● Dart VM Exceptions ● Hovering / Cursor Changes / Scroll Wheel 14
stateful hot reload ?! Terminal - ✔ VS Code - ✔ IntelliJ - TBD 15
Prebuild Embedders google/flutter-desktop- Drakirus/go-flutter-desk gliheng/flutter-rs embedding top-embedder Windows / Linux / Mac Windows / Linux / Mac Linux / Mac 1ans 6 mois 3 mois Plugins - ✔ Plugins - ✔ ✗ Plugins - ✔ @stuartmorgan @Drakirus @gliheng @franciscojma86 @GeertJohan 'PoolEvent' 16
go embedder example 17
go embedder example 18
More to come ● Texture API AOT ● Desktop look and feel ● ● OSx Shell 19
Sources ● https://github.com/flutter/flutter/wiki/The-Engine-architecture ● https://github.com/google/flutter-desktop-embedding ● https://github.com/Drakirus/go-flutter-desktop-embedder ● https://github.com/gliheng/flutter-rs ● https://hackernoon.com/making-the-most-of-flutter-from-basics-to-customization-433171581d01 ● https://proandroiddev.com/flutters-compilation-patterns-24e139d14177 ● https://softwareengineeringdaily.com/2018/10/08/an-overview-of-flutter/ ● https://steveperkins.com/using-java-9-modularization-to-ship-zero-dependency-native-apps/ ● https://proandroiddev.com/flutters-compilation-patterns-24e139d14177 Questions ? 20
Recommend
More recommend