dispose method

  1. @override
Future<void> dispose()
override

Releases the resources of this camera.

Implementation

@override
Future<void> dispose() async {
  if (_isDisposed) {
    return;
  }
  _isDisposed = true;
  super.dispose();
  await _creatingCompleter.future;
  await _channel.invokeMethod<void>(
    'dispose',
    <String, dynamic>{'textureId': _textureId},
  );
  await _eventSubscription.cancel();
}