dispose method

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

Releases the resources of this camera.

Implementation

@override
Future<void> dispose() async {
  if (_isDisposed) {
    return;
  }
  _unawaited(_deviceOrientationSubscription?.cancel());
  _isDisposed = true;
  super.dispose();
  if (_initializeFuture != null) {
    await _initializeFuture;
    await CameraPlatform.instance.dispose(_cameraId);
  }
}