Flutter 2019 / 12 月更新月報

What’s new in Flutter interact ?

  • Flutter 1.12
  • iOS 13 Dark mode、new Cupertino widgets
  • Android App Bundle、AndroidX included
  • Add-to-App support [step][sample]
    將 Flutter 整合至現存的 Android/iOS app

  • Google Fonts support
    新的 google_fonts package 支援 Google Fonts 所有字型。
  • Flutter Gallery - [Android][web][code]
    Flutter widget demo app,專案中包含對網頁和 macOS 的支援。
  • IDE tools

  • Dart Devtools
  • Layout Explorer  - flutter 1.12.16 or later
    點選 devtools 右上角執行 alpha 版本可以試用此功能。

  • Multi-device debugging [link]
  • Flutter Octopus: VS Code code debug
  • UI tools - can convert design to native code for Flutter
  • DartPad
  • support Flutter
  • 透過 https://dartpad.dev/<GistID> 直接分享code。
  • 將DartPad code與執行結果直接Embed在其它網頁上[link]
  • Flutter for Web in master, dev, and beta
  • Flutter for Desktop - for macOS (in alpha)
  • Dart 2.7

  • extension methods:允許替舊的物件撰寫新的方法。
  • 使用var宣告時可以執行新方法,但不能使用dynamic型別。
  • 增加對null情況的安全提示。
  • References

Tips

如果想要體驗這些新功能,可以善用 flutter channel [channel-name] 的指令來切換 Flutter 的版本,[channel-name] 可參考指令 flutter channel 的列表,並隨時用 flutter --version 檢查 Flutter 和 Dart 的版本。

Flutter Widgets

Flutter Clock