dispose method
Dispose of this controller and release resources.
After disposal, the controller cannot be used. Calling methods on a disposed controller will throw.
This is called automatically when the NutrientView is disposed if the controller was created by the view. If you provided your own controller, you are responsible for disposing it.
Implementation
@mustCallSuper
Future<void> dispose() async {
if (_disposed) return;
_disposed = true;
_ready = false;
_bufferedEvents.clear();
await _eventController.close();
await _viewHandle?.dispose();
_viewHandle = null;
}