terminate method
Requests to terminate the execution of a computation.
Parameters:
force: Determines whether the execution of the computation will be terminate immediately or when control is yielded back to the event loop.
Not all platforms support forced termination.
The web platform does not support forced termination.
Implementation
@override
void terminate({bool force = false}) {
if (_isTerminationRequested) {
return;
}
_isTerminationRequested = true;
_terminate();
}