MasamuneControllerBase<TValue, TAdapter extends MasamuneAdapter> class abstract

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を使用して値の変更を監視できます。

Inheritance
Implemented types
Available Extensions

Constructors

MasamuneControllerBase({TAdapter? adapter, TValue? defaultValue})
Abstract class to inherit when you want to create a controller using MasamuneAdapter.

Properties

adapter → TAdapter
TAdapter to be used.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
primaryAdapter → TAdapter
Specifies the default TAdapter if adapter is Null.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → TValue?
The current value of the object. When the value changes, the callbacks registered with addListener will be invoked.
no setteroverride

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setValueInternal(TValue? value) → void
Set method is used to update the current state.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited