MasamuneControllerBase<TValue, TAdapter extends MasamuneAdapter> constructor
MasamuneControllerBase<TValue, TAdapter extends MasamuneAdapter> ({
- TAdapter? adapter,
- TValue? defaultValue,
Abstract class to inherit when you want to create a controller using MasamuneAdapter.
Specify the value to manage in TValue
, and specify MasamuneAdapter in TAdapter
.
If you do not specify adapter
, primaryAdapter is used.
Since it inherits ChangeNotifier, you can use addListener and removeListener to monitor changes in the value.
MasamuneAdapterを利用したコントローラーを作成したい場合に継承する抽象クラスです。
TValue
に管理する値を指定し、TAdapter
にMasamuneAdapterを指定します。
adapter
を指定しない場合は、primaryAdapterを使用します。
ChangeNotifierを継承しているので、addListenerやremoveListenerを使用して値の変更を監視できます。
Implementation
MasamuneControllerBase({TAdapter? adapter, TValue? defaultValue})
: _adapter = adapter,
_value = defaultValue;