more good flutter news (at least, for me)

Even more good news. I’ve gotten the tutorial to operate in an Android emulator on my Mac. After all the updates, including an update to the Android emulator, I was able to launch the emulator as a Pixel 2 XL running Android 7.1 (API 25). Interestingly enough I couldn’t configure an emulator using any of the Pixel 3 smartphone’s; there were none in the AVD manager. The Apple emulator, by contrast, has the latest iPhone XS and XR variants. But at least it works and validates Flutter’s claim that the same application developed in Flutter will run on both iOS and Android.

One quirk getting this to run. When I opened the tutorial back up, VS Code flagged the import of english_words.dart package. I had to re-run ‘flutter packages get’ in the tutorial folder and then restart VS Code. After that it was satisfied.

flutter toolchain cleans up its act

Back in early December I ranted a bit against the full release of Flutter (see “the very definition of insanity – trying to make google flutter work“). I left flutter alone for about a month, and then two days ago this month I upgraded flutter with the following welcome results:

Williams-MBP:~ wbeebe$ flutter upgradeUpgrading Flutter from /Users/wbeebe/Develop/flutter...From https://github.com/flutter/flutter   7a88fbc5f..985ccb6d1  dev   -> origin/dev * [new branch]  logo-tos  -> origin/logo-tos   faae8bde7..517f8dc27  master-> origin/master * [new branch]  mit-mit-patch-1   -> origin/mit-mit-patch-1 * [new branch]  revert-23424-dragfix2 -> origin/revert-23424-dragfix2 * [new branch]  revert-26090-switch_to_dev_finder -> origin/revert-26090-switch_to_dev_finder * [new tag] v1.1.5-> v1.1.5 * [new tag] v1.1.8-> v1.1.8 * [new tag] v1.1.6-> v1.1.6 * [new tag] v1.1.7-> v1.1.7Already up to date.Upgrading engine...Already up-to-date.Flutter 1.0.0 • channel stable • https://github.com/flutter/flutter.gitFramework • revision 5391447fae (6 weeks ago) • 2018-11-29 19:41:26 -0800Engine • revision 7375a0f414Tools • Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)Running flutter doctor...Doctor summary (to see all details, run flutter doctor -v):[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14.1 18B75, locale en-US)[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)[✓] Android Studio (version 3.2)[✓] IntelliJ IDEA Ultimate Edition (version 2018.3.2)[!] Connected device! No devices available! Doctor found issues in 1 category.

You’ll note my biggest gripe is fixed now, the inability to apparently determine if the iOS (sub) toolchain was actually sane. Another minor but welcome fix was for the Android toolchain. The Android toolchain incorporates the Android SDK. In the past flutter doctor would complain that the Android licensing was inconsistent/incorrect. The workaround before this drop was to go and re-run sdkmanager (tools/bin/sdkmanager) and then re-run ‘flutter doctor’. That seemed to fix the Android toolchain issues. I’m not worried about the connected device because right now there is no connected device, and so this error message is correct. Again, these are welcome changes.

This morning I upgraded flutter again and got the following:

Williams-MBP:~ wbeebe$ flutter upgradeUpgrading Flutter from /Users/wbeebe/Develop/flutter...From https://github.com/flutter/flutter   985ccb6d1..1407091bf  dev-> origin/dev + af09490e1...40c4925a5 gallery-> origin/gallery  (forced update)   517f8dc27..6c7fb8805  master -> origin/master * [new tag] v1.1.9 -> v1.1.9Already up to date.Upgrading engine...Already up-to-date.Flutter 1.0.0 • channel stable • https://github.com/flutter/flutter.gitFramework • revision 5391447fae (6 weeks ago) • 2018-11-29 19:41:26 -0800Engine • revision 7375a0f414Tools • Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)Running flutter doctor...Doctor summary (to see all details, run flutter doctor -v):[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14.1 18B75, locale en-US)[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)[✓] Android Studio (version 3.2)[✓] IntelliJ IDEA Ultimate Edition (version 2018.3.2)[!] VS Code (version 1.30.2)[!] Connected device! No devices available! Doctor found issues in 2 categories.

Now the complete toolset is tracking Visual Studio (VS) Code, the editor/minimal IDE. Thinking I needed to update VS Code, I checked my version of VS Code, and guess what?Yep, I’m running with the latest production release. A quick check showed that all the installed plugins were up to date as well. Then I re-ran ‘flutter doctor -v’ and got the verbose output. This is part of what I got on that run.

[!] VS Code (version 1.30.2)• VS Code at /Users/wbeebe/Applications/Visual Studio Code.app/Contents• Flutter extension not installed; install from  https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

Sure enough I was missing the Flutter extension. Don’t ask me how, but re-installing the extension and then running ‘flutter doctor’ again produced the following cleaner output:

Williams-MBP:bin wbeebe$ flutter doctorDoctor summary (to see all details, run flutter doctor -v):[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14.1 18B75, locale en-US)[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)[✓] Android Studio (version 3.2)[✓] IntelliJ IDEA Ultimate Edition (version 2018.3.2)[✓] VS Code (version 1.30.2)[!] Connected device! No devices available! Doctor found issues in 1 category.

Which is what I would have expected. I’m glad that they’re checking VS Code and the Flutter extension, but if there is a problem with the Flutter extension (or any other extension that Flutter depends upon) then they should surface that directly, rather than the current cryptic “You’ve got a problem” error message. Like the connected device message directly below it.

I’m going back into using Flutter for app development instead of using it as an excuse to run tutorials. I’ve got at least two small projects in mind to use this tool on.