WaitAction<St>.remove constructor
Removes a flag previously added with the add method. Removing the flag indicating some process finished running.
If you added the flag with a reference ref, you must also pass the same reference here to remove it. Alternatively, if you want to remove all references to that flag, use the clear method instead.
// Add and remove a wait state, using this as the flag.
dispatch(WaitAction.add(this));
dispatch(WaitAction.remove(this));
// Adds and remove a wait state, using this as the flag, and 123 as a reference.
dispatch(WaitAction.add(this, ref: 123));
dispatch(WaitAction.remove(this, ref: 123));
If you pass a delay, the flag will be removed only after that duration has passed, after the add method is called. Example:
// Add a wait state that will be automatically removed after 3 seconds.
dispatch(WaitAction.add(this));
dispatch(WaitAction.remove(this, delay: Duration(seconds: 3)));
Implementation
WaitAction.remove(
this.flag, {
this.ref,
this.delay,
}) : operation = WaitOperation.remove;