setFlashMode method
Future<bool>
setFlashMode(
- FlashMode mode,
- void setState(
- void ()
)
)
Implementation
Future<bool> setFlashMode(FlashMode mode, void Function(void Function()) setState) async {
if (widget.photoController == null) {
return false;
}
try {
await widget.photoController!.setFlashMode(mode);
if (widget.photoController!.value.flashMode == FlashMode.off) {
setState(() {});
return false;
} else {
setState(() {});
return true;
}
} on CameraException catch (e) {
//DD_CAMERA _showCameraException(e);
rethrow;
}
}