0
1

More than 3 years have passed since last update.

Flutter調べ備忘録

Last updated at Posted at 2021-08-18

この記事は?

Flutter調べたことメモ。
全体像の俯瞰用にシンプルにまとめ。
(気が向いたら随時更新)

記載範囲は?

  • 言語の特徴
  • UIに関して
  • アーキテクチャ
  • メリデメ

言語の特徴

dart

  • オブジェクト指向
  • 静的型付け

JAVAライク。

UIに関して

大きく2種類

material

Android、MaterialDesignのUI。
Material Components widgets

スクリーンショット 2021-08-19 043125.png

Cupertino

iOSなUI。 iOSでよく見るUI部品は大体ある。
Cupertino (iOS-style) widgets

スクリーンショット 2021-08-19 043200.png

 Widget分類

  • StatelessWidget
  • StatefullWidget
  • InheritedWidget
  • RenderObjectWidget

(工事中)
参考
InheritedWidget/InheritedModelとは何か

アーキテクチャ

Provider

主流。Documentには以下記載

  • simplified allocation/disposal of resources
  • lazy-loading
  • a largely reduced boilerplate over making a new class every time
  • devtools friendly
  • a common way to consume these InheritedWidgets (See Provider.of/Consumer/Selector)
  • increased scalability for classes with a listening mechanism that grows exponentially in complexity (such as ChangeNotifier, which is O(N²) for dispatching notifications).

BLoC(Business Logic Component)

制約

1 インプットとアウトプットは、単純なStreamとSinkに限定する。

2 依存性は、必ず注入可能でプラットフォームに依存しないものとする。

3 プラットフォームごとの条件分岐は、許可しない。

上記の制約を守れば、どのような実装でも構わない。
ただし、reactive programmingを推奨したい。

以下から引用、日本語記事は以下がわかりやすい
BLoCパターンとはなにか - FlutterとAngularの間でModelのコードを再利用する実践を通じての考察

他参考サイト
【Dart/Flutter】導入したBLoCパターンアーキテクチャについて全体像をまとめてみた

メリデメ

メリット

  • ビルドキャッシュ機能がAndroidStudioより高性能(HotLoad)
  • 公式ドキュメントがシンプルで充実
  • 以下実例 (2次情報)

デメリット

  • カメラ周辺はバグが多いらしい
  • 新しめの技術はNative一択
    • AR
    • 機械学習

終わり

果たして、工事中は工事されるのか。。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1