public static bool reset(BuildContext context) { _InheritedResetNotifier notifier = context.dependOnInheritedWidgetOfExactType <_InheritedResetNotifier>(); if (notifier == null) { return(false); } return(notifier._sendReset()); }
public static bool shouldReset(BuildContext context) { InheritedWidget widget = context.dependOnInheritedWidgetOfExactType <_InheritedResetNotifier>(); if (widget == null) { return(false); } _InheritedResetNotifier inheritedNotifier = widget as _InheritedResetNotifier; bool wasCalled = inheritedNotifier.notifier._wasCalled; inheritedNotifier.notifier._wasCalled = false; return(wasCalled); }