isFailed static method
Returns true if an actionOrTypeOrList
failed with an UserException.
It's recommended that you use the BuildContext extension instead:
if (context.isFailed(MyAction)) { // Show an error message. }
Widgets that use this method WILL rebuild whenever the state changes
(unless you pass the notify
parameter as false
).
Implementation
static bool isFailed(
BuildContext context,
Object actionOrTypeOrList, {
bool notify = true,
}) =>
(notify ? _getStoreWithDependency_Untyped : _getStoreNoDependency_Untyped)(context)
.isFailed(actionOrTypeOrList);