もやぶろ

moyashidaisukeのブログだからもやぶろ。フリーランスのエンジニアのダイスケです。プログラム関連とかギター関連とか旅行関連とか色々。

【Flutter】Flutter1.9.1とDart2.5まとめ(Flutterのバージョンアップしました)

概要

Flutter(一緒にDartも)のバージョンアップをしました (1.7.8-> 1.9.1)

バージョンアップにあたりまとめた情報と、手順メモです。DartのML補完が面白かったです。

これすごくない??

現状

$ flutter --version       
Flutter 1.7.8+hotfix.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 20e59316b8 (4 months ago) • 2019-07-18 20:04:33 -0700
Engine • revision fee001c93f
Tools • Dart 2.4.0



$ flutter doctor     
  ╔════════════════════════════════════════════════════════════════════════════╗
  ║ A new version of Flutter is available!                                     ║
  ║                                                                            ║
  ║ To update to the latest version, run "flutter upgrade".                    ║
  ╚════════════════════════════════════════════════════════════════════════════╝


Doctor summary (to see all details, run flutter doctor -v):
[] Flutter (Channel stable, v1.7.8+hotfix.4, on Mac OS X 10.14.6 18G95, locale ja-JP)

[] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[] Xcode - develop for iOS and macOS (Xcode 10.3)
[] iOS tools - develop for iOS devices
[] Android Studio (version 3.5)
[] Android Studio (version 3.5)
[] VS Code (version 1.39.1)
[!] Connected device
    ! No devices available


$  flutter channel    

Flutter channels:
  beta
  dev
  master
* stable

事前調査

flutterのchannel

github.com

Flutterのバージョンはchannel(チャンネル)という考え方で複数運用されています。

最新だけど不安定な順番で、

  1. master
  2. dev
  3. beta
  4. stable

となっています。 特別な理由がなければstableがおすすめされています。

自分の環境での設定を確認するコマンドは、

flutter channel    

です。私は特別な理由が無いのでstable

ちなみに切り替えたい場合は、

flutter channel 切り替えたいchannel
flutter upgrade

だそうです。

channel毎のバージョンはここで確認ができます。

flutter.dev

1.9.1の調査

stableの最新版は1.9.1なので、このバージョンの詳細を確認します。

f:id:moyashidaisuke:20191105144532p:plain

releasenote

github.com

公式youtube

www.youtube.com

英語だけどわかりやすい

まとめ記事

medium.com

medium.com

まとめの個人的まとめ

自分が気になったところだけです。網羅はできてないのでご注意ください。

Catalinaサポート

macの新しいOSのCatalinaサポートです。

you’ll want to upgrade to the Flutter 1.9.1 stable release before upgrading to Catalina.

OSを更新する前にFlutterのバージョンアップする事が推奨されています。(こういうのがあるからMacOSの更新は慎重になった方が良い、、、)

iOS13サポート

iOS13でスクロールバーを直接操作できるようになったそうなのですが(自分はiOS13の端末もってないので、、)、これにWidgetも対応してくれるそうです。

dekiru.net

Widgetの追加

Widget(FlutterのUIコンポーネント)がいくつか追加されています。

developers.googleblog.com

「New Material widgets」あたり。ToggleButtonsColorFilteredだそうです。 ToggleButtonsは使いやすそうですね。

Dart2.5

medium.com

ML Complete, code completions ranked by machine learning

!?

機械学習によるコード補完だそうです!(まだpreviewだけど)

あとはCコードを直接呼べるとか。パフォーマンス気にしてFlutterの導入を見送ってた勢には響くかもですね。

その他

github.com

リリースノートに全部書いてある。

Breaking API Changesもけっこうあるのだけど、多すぎて見きれない。更新が激しいからしょうが無いね、、、

バージョンアップする

flutter upgradeコマンド実行

$ flutter upgrade             
Upgrading Flutter from /Applications/flutter...
From https://github.com/flutter/flutter
 + 20e59316b...68587a091 stable                  -> origin/stable  (forced update)
 * [new branch]          Hixie-patch-1           -> origin/Hixie-patch-1
 * [new branch]          Hixie-patch-2           -> origin/Hixie-patch-2
 * [new branch]          Hixie-patch-3           -> origin/Hixie-patch-3
 * [new branch]          Hixie-patch-4           -> origin/Hixie-patch-4
 + 20e59316b...e70236e36 beta                    -> origin/beta  (forced update)
 * [new branch]          blasten-patch-1         -> origin/blasten-patch-1
   0a39d8d92..1946fc4da  dev                     -> origin/dev
 * [new branch]          generated_explicit_type -> origin/generated_explicit_type
 * [new branch]          hot_restart_lowercase_r -> origin/hot_restart_lowercase_r
   aa6384cba..9093cf15f  master                  -> origin/master
 * [new branch]          potato620-patch-1       -> origin/potato620-patch-1
 * [new branch]          refactor                -> origin/refactor
 * [new branch]          revert-37962-show-search-app-bar-theme -> origin/revert-37962-show-search-app-bar-theme
 * [new branch]          revert-38861-use_frame_timings -> origin/revert-38861-use_frame_timings
 * [new branch]          revert-38922-text-docs  -> origin/revert-38922-text-docs
 * [new branch]          revert-40607-animationOverview -> origin/revert-40607-animationOverview
 * [new branch]          revert-40634-goldenTriageBenchmark -> origin/revert-40634-goldenTriageBenchmark
 * [new branch]          revert-40710-flutterGold -> origin/revert-40710-flutterGold
 * [new branch]          revert-40726-roll_branch -> origin/revert-40726-roll_branch
 * [new branch]          revert-41415-exposeimage -> origin/revert-41415-exposeimage
 * [new branch]          revert-41780-fix_build  -> origin/revert-41780-fix_build
 * [new branch]          sjindel.elf             -> origin/sjindel.elf
 * [new branch]          v1.9.1-hotfixes         -> origin/v1.9.1-hotfixes
 * [new tag]             v1.10.14                -> v1.10.14
 * [new tag]             v1.10.7                 -> v1.10.7
 * [new tag]             v1.8.3                  -> v1.8.3
 * [new tag]             v1.8.4                  -> v1.8.4
 * [new tag]             v1.9.0                  -> v1.9.0
 * [new tag]             v1.9.1                  -> v1.9.1
 * [new tag]             v1.9.1+hotfix.1         -> v1.9.1+hotfix.1
 * [new tag]             v1.9.1+hotfix.2         -> v1.9.1+hotfix.2
 * [new tag]             v1.9.1+hotfix.3         -> v1.9.1+hotfix.3
 * [new tag]             v1.9.1+hotfix.4         -> v1.9.1+hotfix.4
 * [new tag]             v1.9.1+hotfix.5         -> v1.9.1+hotfix.5
 * [new tag]             v1.9.1+hotfix.6         -> v1.9.1+hotfix.6
 * [new tag]             v1.10.0                 -> v1.10.0
 * [new tag]             v1.10.1                 -> v1.10.1
 * [new tag]             v1.10.10                -> v1.10.10
 * [new tag]             v1.10.11                -> v1.10.11
 * [new tag]             v1.10.12                -> v1.10.12
 * [new tag]             v1.10.13                -> v1.10.13
 * [new tag]             v1.10.2                 -> v1.10.2
 * [new tag]             v1.10.3                 -> v1.10.3
 * [new tag]             v1.10.4                 -> v1.10.4
 * [new tag]             v1.10.5                 -> v1.10.5
 * [new tag]             v1.10.6                 -> v1.10.6
 * [new tag]             v1.10.8                 -> v1.10.8
 * [new tag]             v1.10.9                 -> v1.10.9
 * [new tag]             v1.9.2                  -> v1.9.2
 * [new tag]             v1.9.3                  -> v1.9.3
 * [new tag]             v1.9.4                  -> v1.9.4
 * [new tag]             v1.9.5                  -> v1.9.5
 * [new tag]             v1.9.6                  -> v1.9.6
 * [new tag]             v1.9.7                  -> v1.9.7
Updating d51fd86cd..68587a091
 PATENTS => PATENT_GRANT                            |     0
 dev/automated_tests/icon/test.png                  |   Bin 0 -> 423 bytes
 .../AppIcon.appiconset/Icon-App-1024x1024@1x.png   |   Bin 11112 -> 10932 bytes
 dev/devicelab/images/agent-statuses.png            |   Bin 18399 -> 13842 bytes
 dev/devicelab/images/broken-test.png               |   Bin 69897 -> 56878 bytes
 dev/devicelab/images/legend.png                    |   Bin 48845 -> 30220 bytes
 .../drawable-land-xxhdpi/flutter_splash_screen.png |   Bin 0 -> 3861 bytes
 .../res/drawable-xxhdpi/flutter_splash_screen.png  |   Bin 0 -> 4428 bytes
 .../app/src/main/res/mipmap-hdpi/ic_launcher.png   |   Bin 0 -> 544 bytes
 .../mipmap-land-xxhdpi/flutter_splash_screen.png   |   Bin 0 -> 3861 bytes
 .../app/src/main/res/mipmap-mdpi/ic_launcher.png   |   Bin 0 -> 442 bytes
 .../app/src/main/res/mipmap-xhdpi/ic_launcher.png  |   Bin 0 -> 721 bytes
 .../res/mipmap-xxhdpi/flutter_splash_screen.png    |   Bin 0 -> 4428 bytes
 .../app/src/main/res/mipmap-xxhdpi/ic_launcher.png |   Bin 0 -> 1031 bytes
 .../src/main/res/mipmap-xxxhdpi/ic_launcher.png    |   Bin 0 -> 1443 bytes
 .../app/src/main/res/mipmap-hdpi/ic_launcher.png   |   Bin 0 -> 544 bytes
 .../app/src/main/res/mipmap-mdpi/ic_launcher.png   |   Bin 0 -> 442 bytes
 .../app/src/main/res/mipmap-xhdpi/ic_launcher.png  |   Bin 0 -> 721 bytes
 .../app/src/main/res/mipmap-xxhdpi/ic_launcher.png |   Bin 0 -> 1031 bytes
 .../src/main/res/mipmap-xxxhdpi/ic_launcher.png    |   Bin 0 -> 1443 bytes
 .../app/src/main/res/mipmap-hdpi/ic_launcher.png   |   Bin 0 -> 544 bytes
 .../app/src/main/res/mipmap-mdpi/ic_launcher.png   |   Bin 0 -> 442 bytes
 .../app/src/main/res/mipmap-xhdpi/ic_launcher.png  |   Bin 0 -> 721 bytes
 .../app/src/main/res/mipmap-xxhdpi/ic_launcher.png |   Bin 0 -> 1031 bytes
 .../src/main/res/mipmap-xxxhdpi/ic_launcher.png    |   Bin 0 -> 1443 bytes
 .../AppIcon.appiconset/Icon-App-1024x1024@1x.png   |   Bin 0 -> 10932 bytes
 .../AppIcon.appiconset/Icon-App-20x20@1x.png       |   Bin 0 -> 564 bytes
 .../AppIcon.appiconset/Icon-App-20x20@2x.png       |   Bin 0 -> 1283 bytes
 .../AppIcon.appiconset/Icon-App-20x20@3x.png       |   Bin 0 -> 1588 bytes
 .../AppIcon.appiconset/Icon-App-29x29@1x.png       |   Bin 0 -> 1025 bytes
 .../AppIcon.appiconset/Icon-App-29x29@2x.png       |   Bin 0 -> 1716 bytes
 .../AppIcon.appiconset/Icon-App-29x29@3x.png       |   Bin 0 -> 1920 bytes
 .../AppIcon.appiconset/Icon-App-40x40@1x.png       |   Bin 0 -> 1283 bytes
 .../AppIcon.appiconset/Icon-App-40x40@2x.png       |   Bin 0 -> 1895 bytes
 .../AppIcon.appiconset/Icon-App-40x40@3x.png       |   Bin 0 -> 2665 bytes
 .../AppIcon.appiconset/Icon-App-60x60@2x.png       |   Bin 0 -> 2665 bytes
 .../AppIcon.appiconset/Icon-App-60x60@3x.png       |   Bin 0 -> 3831 bytes
 .../AppIcon.appiconset/Icon-App-76x76@1x.png       |   Bin 0 -> 1888 bytes
 .../AppIcon.appiconset/Icon-App-76x76@2x.png       |   Bin 0 -> 3294 bytes
 .../AppIcon.appiconset/Icon-App-83.5x83.5@2x.png   |   Bin 0 -> 3612 bytes
 .../LaunchImage.imageset/LaunchImage.png           |   Bin 0 -> 68 bytes
 .../LaunchImage.imageset/LaunchImage@2x.png        |   Bin 0 -> 68 bytes
 .../LaunchImage.imageset/LaunchImage@3x.png        |   Bin 0 -> 68 bytes
 .../AppIcon.appiconset/Icon-App-1024x1024@1x.png   |   Bin 11112 -> 10932 bytes
 .../AppIcon.appiconset/Icon-App-1024x1024@1x.png   |   Bin 11112 -> 10932 bytes
 .../ios_host_app/Flutter/.gitkeep                  |     0
 .../AppIcon.appiconset/Icon-App-1024x1024@1x.png   |   Bin 11112 -> 10932 bytes
 dev/snippets/assets/code_sample.png                |   Bin 58572 -> 39037 bytes
 dev/snippets/assets/code_snippet.png               |   Bin 202228 -> 113476 bytes
 .../app/src/main/res/mipmap-hdpi/ic_background.png |   Bin 18209 -> 2583 bytes
 .../app/src/main/res/mipmap-hdpi/ic_foreground.png |   Bin 3581 -> 2063 bytes
 .../app/src/main/res/mipmap-hdpi/ic_launcher.png   |   Bin 3951 -> 3116 bytes
 .../src/main/res/mipmap-xhdpi/ic_background.png    |   Bin 31807 -> 3231 bytes
 .../src/main/res/mipmap-xhdpi/ic_foreground.png    |   Bin 5455 -> 2721 bytes
 .../app/src/main/res/mipmap-xhdpi/ic_launcher.png  |   Bin 5326 -> 3980 bytes
 .../src/main/res/mipmap-xxhdpi/ic_background.png   |   Bin 72301 -> 4963 bytes
 .../src/main/res/mipmap-xxhdpi/ic_foreground.png   |   Bin 10303 -> 4613 bytes
 .../app/src/main/res/mipmap-xxhdpi/ic_launcher.png |   Bin 9650 -> 7167 bytes
 .../src/main/res/mipmap-xxxhdpi/ic_background.png  |   Bin 125855 -> 6802 bytes
 .../src/main/res/mipmap-xxxhdpi/ic_foreground.png  |   Bin 16499 -> 6155 bytes
 .../src/main/res/mipmap-xxxhdpi/ic_launcher.png    |   Bin 13901 -> 9897 bytes
 .../AppIcon.appiconset/Icon-120.png                |   Bin 1787 -> 1750 bytes
 .../AppIcon.appiconset/Icon-152.png                |   Bin 2162 -> 2003 bytes
 .../app/src/main/res/mipmap-hdpi/ic_launcher.png   |   Bin 0 -> 544 bytes
 .../app/src/main/res/mipmap-mdpi/ic_launcher.png   |   Bin 0 -> 442 bytes
 .../app/src/main/res/mipmap-xhdpi/ic_launcher.png  |   Bin 0 -> 721 bytes
 .../app/src/main/res/mipmap-xxhdpi/ic_launcher.png |   Bin 0 -> 1031 bytes
 .../src/main/res/mipmap-xxxhdpi/ic_launcher.png    |   Bin 0 -> 1443 bytes
 examples/image_list/images/coast.jpg               |   Bin 0 -> 202344 bytes
 .../AppIcon.appiconset/Icon-App-1024x1024@1x.png   |   Bin 0 -> 11112 bytes
 .../AppIcon.appiconset/Icon-App-20x20@1x.png       |   Bin 0 -> 564 bytes
 .../AppIcon.appiconset/Icon-App-20x20@2x.png       |   Bin 0 -> 1283 bytes
 .../AppIcon.appiconset/Icon-App-20x20@3x.png       |   Bin 0 -> 1588 bytes
 .../AppIcon.appiconset/Icon-App-29x29@1x.png       |   Bin 0 -> 1025 bytes
 .../AppIcon.appiconset/Icon-App-29x29@2x.png       |   Bin 0 -> 1716 bytes
 .../AppIcon.appiconset/Icon-App-29x29@3x.png       |   Bin 0 -> 1920 bytes
 .../AppIcon.appiconset/Icon-App-40x40@1x.png       |   Bin 0 -> 1283 bytes
 .../AppIcon.appiconset/Icon-App-40x40@2x.png       |   Bin 0 -> 1895 bytes
 .../AppIcon.appiconset/Icon-App-40x40@3x.png       |   Bin 0 -> 2665 bytes
 .../AppIcon.appiconset/Icon-App-60x60@2x.png       |   Bin 0 -> 2665 bytes
 .../AppIcon.appiconset/Icon-App-60x60@3x.png       |   Bin 0 -> 3831 bytes
 .../AppIcon.appiconset/Icon-App-76x76@1x.png       |   Bin 0 -> 1888 bytes
 .../AppIcon.appiconset/Icon-App-76x76@2x.png       |   Bin 0 -> 3294 bytes
 .../AppIcon.appiconset/Icon-App-83.5x83.5@2x.png   |   Bin 0 -> 3612 bytes
 .../LaunchImage.imageset/LaunchImage.png           |   Bin 0 -> 68 bytes
 .../LaunchImage.imageset/LaunchImage@2x.png        |   Bin 0 -> 68 bytes
 .../LaunchImage.imageset/LaunchImage@3x.png        |   Bin 0 -> 68 bytes
 .../app/src/main/res/mipmap-hdpi/ic_launcher.png   |   Bin 3481 -> 3041 bytes
 .../app/src/main/res/mipmap-mdpi/ic_launcher.png   |   Bin 2121 -> 1958 bytes
 .../app/src/main/res/mipmap-xhdpi/ic_launcher.png  |   Bin 5061 -> 4372 bytes
 .../app/src/main/res/mipmap-xxhdpi/ic_launcher.png |   Bin 8878 -> 7152 bytes
 .../src/main/res/mipmap-xxxhdpi/ic_launcher.png    |   Bin 13629 -> 10393 bytes
 .../AppIcon.appiconset/Icon-60@2x.png              |   Bin 7210 -> 5633 bytes
 .../AppIcon.appiconset/Icon-60@3x.png              |   Bin 12818 -> 9562 bytes
 .../Assets.xcassets/AppIcon.appiconset/Icon-76.png |   Bin 3804 -> 3115 bytes
 .../AppIcon.appiconset/Icon-76@2x.png              |   Bin 10082 -> 7587 bytes
 .../AppIcon.appiconset/Icon-83.5@2x.png            |   Bin 11552 -> 8627 bytes
 .../AppIcon.appiconset/Icon-Notification@2x.png    |   Bin 1529 -> 1404 bytes
 .../AppIcon.appiconset/Icon-Notification@3x.png    |   Bin 2663 -> 2297 bytes
 .../AppIcon.appiconset/Icon-Small-40.png           |   Bin 1529 -> 1404 bytes
 .../AppIcon.appiconset/Icon-Small-40@2x.png        |   Bin 4058 -> 3282 bytes
 .../AppIcon.appiconset/Icon-Small-40@3x.png        |   Bin 7210 -> 5633 bytes
 .../AppIcon.appiconset/Icon-Small@2x.png           |   Bin 2518 -> 2164 bytes
 .../AppIcon.appiconset/Icon-Small@3x.png           |   Bin 4520 -> 3725 bytes
 .../AppIcon.appiconset/Icon-App-1024x1024@1x.png   |   Bin 11112 -> 10932 bytes
 .../AppIcon.appiconset/Icon-App-1024x1024@1x.png   |   Bin 11112 -> 10932 bytes
 .../test_data/basic_project.dart                   |     0
 .../test_data/hot_reload_project.dart              |     0
 .../test_data/project.dart                         |     0
 .../test_data/stepping_project.dart                |     0
 .../test_data/tests_project.dart                   |     0
 1259 files changed, 85422 insertions(+), 20163 deletions(-)
Current branch stable is up to date.

Upgrading engine...
Downloading Dart SDK from Flutter engine b863200c37df4ed378042de11c4e9ff34e4e58c9...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  2  263M    2 7678k    0     0  6394k      0  0:00:42  0:00:01  0:00:41 6393k
  7  263M    7 20.6M    0     0  9623k      0  0:00:28  0:00:02  0:00:26 9619k
 12  263M   12 32.8M    0     0  10.2M      0  0:00:25  0:00:03  0:00:22 10.2M
 16  263M   16 43.6M    0     0  10.3M      0  0:00:25  0:00:04  0:00:21 10.3M
 20  263M   20 55.3M    0     0  10.6M      0  0:00:24  0:00:05  0:00:19 11.1M
 25  263M   25 67.8M    0     0  10.9M      0  0:00:24  0:00:06  0:00:18 12.0M
 30  263M   30 79.4M    0     0  11.0M      0  0:00:23  0:00:07  0:00:16 11.7M
 34  263M   34 90.9M    0     0  11.0M      0  0:00:23  0:00:08  0:00:15 11.6M
 38  263M   38  102M    0     0  11.1M      0  0:00:23  0:00:09  0:00:14 11.8M
 43  263M   43  115M    0     0  11.3M      0  0:00:23  0:00:10  0:00:13 12.0M
 48  263M   48  127M    0     0  11.4M      0  0:00:23  0:00:11  0:00:12 11.9M
 52  263M   52  139M    0     0  11.4M      0  0:00:23  0:00:12  0:00:11 11.9M
 57  263M   57  151M    0     0  11.4M      0  0:00:23  0:00:13  0:00:10 12.0M
 61  263M   61  163M    0     0  11.5M      0  0:00:22  0:00:14  0:00:08 12.1M
 66  263M   66  175M    0     0  11.5M      0  0:00:22  0:00:15  0:00:07 11.9M
 71  263M   71  188M    0     0  11.6M      0  0:00:22  0:00:16  0:00:06 12.0M
 75  263M   75  200M    0     0  11.6M      0  0:00:22  0:00:17  0:00:05 12.1M
 78  263M   78  207M    0     0  11.4M      0  0:00:23  0:00:18  0:00:05 11.3M
 80  263M   80  211M    0     0  10.9M      0  0:00:23  0:00:19  0:00:04 9795k
 80  263M   80  213M    0     0  10.5M      0  0:00:24  0:00:20  0:00:04 7811k
 82  263M   82  218M    0     0  10.3M      0  0:00:25  0:00:21  0:00:04 6281k
 87  263M   87  231M    0     0  10.4M      0  0:00:25  0:00:22  0:00:03 6461k
 92  263M   92  244M    0     0  10.5M      0  0:00:25  0:00:23  0:00:02 7447k
 97  263M   97  256M    0     0  10.5M      0  0:00:24  0:00:24 --:--:-- 9280k
100  263M  100  263M    0     0  10.6M      0  0:00:24  0:00:24 --:--:-- 10.7M
Building flutter tool...
Downloading android-arm-profile/darwin-x64 tools...                 1.1s
Downloading android-arm-release/darwin-x64 tools...                 0.9s
Downloading android-arm64-profile/darwin-x64 tools...               0.9s
Downloading android-arm64-release/darwin-x64 tools...               0.8s
Downloading android-x86 tools...                                    2.3s
Downloading android-x64 tools...                                    2.4s
Downloading android-arm tools...                                    1.5s
Downloading android-arm-profile tools...                            0.9s
Downloading android-arm-release tools...                            0.9s
Downloading android-arm64 tools...                                  1.6s
Downloading android-arm64-profile tools...                          1.1s
Downloading android-arm64-release tools...                          0.9s
Downloading ios tools...                                            4.3s
Downloading ios-profile tools...                                    2.9s
Downloading ios-release tools...                                    2.3s
Downloading package sky_engine...                                   0.7s
Downloading common tools...                                         1.5s
Downloading common tools...                                         1.3s
Downloading darwin-x64 tools...                                     3.8s
Downloading libimobiledevice...                                     0.1s
Downloading usbmuxd...                                              0.1s
Downloading libplist...                                             0.1s
Downloading openssl...                                              0.2s
Downloading ideviceinstaller...                                     0.1s
Downloading ios-deploy...                                           0.1s

Flutter 1.7.8+hotfix.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 20e59316b8 (7 weeks ago) • 2019-09-13 19:46:58 -0700
Engine • revision b863200c37
Tools • Dart 2.4.0

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.14.6 18G95, locale ja-JP)
[] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[] Xcode - develop for iOS and macOS (Xcode 10.3)
[] Android Studio (version 3.5)
[] Android Studio (version 3.5)
[] VS Code (version 1.39.1)
[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.
~/AndroidStudioProjects/english % flutter --version                           [master:english]
Flutter 1.9.1+hotfix.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 68587a0916 (7 weeks ago) • 2019-09-13 19:46:58 -0700
Engine • revision b863200c37
Tools • Dart 2.5.0

更新されました。

AndroidStudioのプラグインも更新

f:id:moyashidaisuke:20191105190408p:plain

エラー表示の設定変更

新機能をオンに。

f:id:moyashidaisuke:20191105190527p:plain

※私の環境だとデフォルトでONでした

※公式Youtubeとはチェックボックスの位置が変わっています。

【推し機能】DartのML補完を有効

github.com

まだPreview機能なので、裏技的な設定でないと有効にならないみたいです。

Help -> FindAction -> 「Registry」と入力

f:id:moyashidaisuke:20191105191012p:plain

「dart.server.additional.arguments 」に「--enable-completion-model」と設定して再起動

f:id:moyashidaisuke:20191105191203p:plain

有効にするとこんな感じ。すごい。

flutter_export_environment.shをgitignore

gitignoreファイルに **/ios/Flutter/flutter_export_environment.shを追加します。

まとめ

作業自体は特につまらずにできました。環境周りが綺麗でドハマリしにくいのがFlutterの良いところです。

あと、機械学習による補完すごいですね!(Dartが地味すぎて全然話題になってないけど、)新体験でした!

名前重要がより重要になりますね。適切な変数名とかをつけると補完もききやすくなって、より開発がスムーズになるという。

Dartあまり面白みが無い言語だと思ってたのですが、こういう攻め方は新しい。