runBool method
Task booleana → success/error.
Implementation
Future<void> runBool(
Future<bool> Function() task, {
StateId successId = 'success',
StateId errorId = 'error',
Duration? stateDelay,
bool resetToInit = true,
}) async {
await run(() async => (await task()) ? successId : errorId, stateDelay: stateDelay, resetToInit: resetToInit);
}