QudsValue<T> constructor
QudsValue<T> ({})
name: the key name of the value, must be unique
value
: an initial value
serializable: set weather the value can be serialized for saving and restoring.
Implementation
QudsValue(
{required this.name,
required T value,
this.serializable,
this.jsonGetter}) {
_isListNotifier = value is QudsListNotifier;
if (_isListNotifier)
_listNotifier = value as QudsListNotifier;
else
_valueNotifier = ValueNotifier<T>(value);
_valueNotifier?.addListener(_onChange);
_listNotifier?.addWatcher(_onChange);
}