hasFlash property

Future<bool?> get hasFlash

check if the device has a flash.

Implementation

Future<bool?> get hasFlash async {
  if (!value.isInitialized! || _isDisposed) {
    throw CameraException(
      'Uninitialized CameraController.',
      'hasFlash was called on uninitialized CameraController',
    );
  }

  try {
    return await _channel.invokeMethod<bool>('hasFlash');
  } on PlatformException catch (e) {
    throw CameraException(e.code, e.message);
  }
}