notify method
bool
notify({
- SnapState<
T> ? nextSnap, - SideEffects<
T> ? sideEffects, - bool shouldOverrideDefaultSideEffects(
- SnapState<
T>
- SnapState<
- StateInterceptor<
T> ? stateInterceptor,
override
Notify observers
Implementation
@override
bool notify({
SnapState<T>? nextSnap,
SideEffects<T>? sideEffects,
bool Function(SnapState<T>)? shouldOverrideDefaultSideEffects,
StateInterceptor<T>? stateInterceptor,
}) {
final isNotified = super.notify(
nextSnap: nextSnap,
sideEffects: sideEffects,
stateInterceptor: stateInterceptor,
);
if (!isNotified) {
return false;
}
if (nextSnap == null) {
return true;
}
if (shouldOverrideDefaultSideEffects?.call(_snapState) != true) {
sideEffectsGlobal
?..onSetState?.call(_snapState)
.._onAfterBuild?.call();
}
assert(() {
if (debugPrintWhenNotifiedPreMessageGlobal != null &&
_snapState._infoMessage != kInitMessage) {
// if (_snapState == _snapState.oldSnapState) {
// return true;
// }
_snapState.debugPrint();
}
return true;
}());
return true;
}