dispose method
Releases the resources of this camera.
Implementation
@override
Future<void> dispose() async {
if (_isDisposed) {
return;
}
_isDisposed = true;
super.dispose();
if (_creatingCompleter != null) {
await _creatingCompleter!.future;
await _channel.invokeMethod<void>(
'dispose',
<String, dynamic>{'textureId': _textureId},
);
await _eventSubscription?.cancel();
}
}