release method

Future<void> release()

Disconnects and releases the Camera object resources.

You must call this as soon as you're done with the Camera object.

Implementation

Future<void> release() {
  if (_isClosed) return Future<void>.value();

  _isClosed = true;
  return CameraChannel.channel.invokeMethod<void>(
    'Camera#release',
    <String, dynamic>{'handle': handle},
  );
}