Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Flutter Overview - AppDojo June 2018

Flutter Overview - AppDojo June 2018

AppDojoの資料です。

App Dojo June 2018 - トップ
https://events.withgoogle.com/app-dojo-june-2018/

Rui Kowase

June 26, 2018
Tweet

More Decks by Rui Kowase

Other Decks in Technology

Transcript

  1. Profile • Name: Rui Kowase / 小和瀬 塁 • Account:

    @rkowase Skill: Flutter, Android, etc...
  2. What’s Flutter Flutter makes it easy and fast to build

    beautiful mobile apps. https://github.com/flutter/flutter
  3. Dart 2 • A client-optimized language • Rich & powerful

    frameworks • Delightful & flexible tooling https://www.dartlang.org/
  4. What’s New in Release Preview 1 https://medium.com/flutter-io/flutter-release-preview-1-943a9b6ee65a • Fundamentals ◦

    Material Design Widget ◦ Dart 2 • Ecosystem ◦ Firebase ◦ AdMob • Tooling ◦ Android Studio ◦ IntelliJ IDE ◦ VS Code
  5. Feature • Build beautiful native apps in record time •

    Fast development • Expressive, beautiful UIs • Modern, reactive framework • Access native features and SDKs • Unified app development https://flutter.io/
  6. Question Are you • Web dev? • Android dev? •

    iOS dev? • React Native dev? 15
  7. Flutter Documentation 17 https://flutter.io/docs/ Flutter for Web devs Flutter for

    Android devs Flutter for iOS devs Flutter for React Native devs
  8. Dart 1 to Dart 2 23 Container( padding: EdgeInsets.all(16.0), child:

    Text("Flutter") ), Dart 1 new Container( padding: const EdgeInsets.all(16.0), child: new Text("Flutter") ), Dart 2
  9. Build production app for Android - Step1 (Create key.properties) 25

    storePassword=<password from previous step> keyPassword=<password from previous step> keyAlias=key storeFile=<location of the key store file, e.g. /Users/<username>/key.jks>
  10. Build production app for Android - Step2 (Edit build.gradle) 26

    +def keystorePropertiesFile = rootProject.file("key.properties") +def keystoreProperties = new Properties() +keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) android {
  11. Build production app for Android - Step3 (Edit build.gradle) 27

    +signingConfigs { + release { + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile file(keystoreProperties['storeFile']) + storePassword keystoreProperties['storePassword'] + } +} +buildTypes { + release { + signingConfig signingConfigs.release + } +}
  12. Build production app for Android - Step4 (flutter build apk)

    28 $ flutter build apk Initializing gradle... 1.0s Resolving dependencies... 8.1s Running 'gradlew assembleRelease'... Skipping AOT snapshot build. Fingerprint match. Built build/app/outputs/apk/release/app-release.apk (9.2MB).
  13. Flutter sessions • Flutter & Design ◦ Customize Material Components

    for your product ◦ Build great Material Design products across platforms ◦ Code beautiful UI with Flutter and Material Design • Flutter & Firebase ◦ Total mobile development made fun with Flutter and Firebase ◦ Add Firebase to your cross-platform React Native or Flutter app • Flutter ◦ Build reactive mobile apps with Flutter https://events.google.com/io/schedule/?section=may-8&topic=flutter&type=sessions
  14. Material Components Support (May 2018) Android (1.0.0-alpha1) iOS (55.0.2) Web

    (0.35.1) Flutter (Beta 3) Color theme components 8 / 16 12 / 16 9 / 16 16 / 16 Type theme components 7 / 10 9 / 10 5 / 10 10 / 10 Expanded set of components 1 / 3 2 / 3 0 / 3 3 / 3 Shape parameter 0 / 2 2 / 2 2 / 2 2 / 2 https://github.com/material-components/material-components/blob/develop/ROADMAP.md
  15. How to integrate 1. Signed up for a Firebase account

    2. Create a Firebase project 3. Platform-specific Firebase configuration ◦ Configure iOS ◦ Configure Android
  16. Handling state • Flutter & state - setState() • State

    & widget tree - InheritedWidget() • Reactive with streams - BLoC & Stream https://www.youtube.com/watch?v=RS36gBEp8OI
  17. ScopedModel • External Package • Build on InheritedWidget • Access,

    Update & Mutate https://pub.dartlang.org/ packages/scoped_model
  18. Pros/Cons - BLoC & Stream • Access state ✅ •

    Updating on change ✅ • Mutating state ✅
  19. Appendix - Build reactive mobile apps with Flutter (Google I/O

    '18) メモ - Qiita https://qiita.com/rkowase/items/23ee4264d54e7890d919