didUpdateValue method Null safety

  1. @override
void didUpdateValue(
  1. TimeOfDay? oldValue
)
override

Called whenever a new value is assigned to value.

The new value can be accessed via the regular value getter and the previous value is provided as oldValue.

Subclasses should call notifyListeners from this method, if the new value changes what toPrimitives returns.

Implementation

@override
void didUpdateValue(TimeOfDay? oldValue) {
  assert(debugIsSerializableForRestoration(value.hour));
  assert(debugIsSerializableForRestoration(value.minute));
  notifyListeners();
}