MasamuneControllerBase<TValue, TAdapter extends MasamuneAdapter> constructor

MasamuneControllerBase<TValue, TAdapter extends MasamuneAdapter>({
  1. TAdapter? adapter,
  2. 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に管理する値を指定し、TAdapterMasamuneAdapterを指定します。

adapterを指定しない場合は、primaryAdapterを使用します。

ChangeNotifierを継承しているので、addListenerremoveListenerを使用して値の変更を監視できます。

Implementation

MasamuneControllerBase({TAdapter? adapter, TValue? defaultValue})
    : _adapter = adapter,
      _value = defaultValue;