run method

Future<void> run(
  1. AsyncCallback callback
)

Sets the value to true while the callback runs and resets it to false afterward.

Implementation

Future<void> run(AsyncCallback callback) async {
  try {
    value = true;
    await callback();
  } finally {
    value = false;
  }
}