initWithValue method

  1. @mustCallSuper
  2. @override
void initWithValue(
  1. T value
)
override

Called by the RestorationMixin with the value returned by either createDefaultValue or fromPrimitives to set the value that this property currently wraps.

The initWithValue method may be called multiple times throughout the life of the RestorableProperty whenever new restoration data has been provided to the RestorationMixin the property is registered to. When initWithValue is called, the property should forget its previous value and re-initialize itself to the newly provided value.

Implementation

@mustCallSuper
@override
void initWithValue(T value) {
  _value = value;
}