stop abstract method
Stop this component, typically in a synchronous fashion.
Should not throw an exception if the component is not running.
The callback is used to enable asynchronous shutdown. Implementations should call the callback once their shutdown process is complete.
Parameters
callback
: A callback to invoke once shutdown is complete (may be null)
Implementation Notes
- If shutdown is synchronous, call the callback immediately
- If shutdown is asynchronous, call the callback when complete
- Always call the callback, even if it's null (null-safe call)
Implementation
FutureOr<void> stop([Runnable? callback]);