setFlashMode method
Implementation
Future<void> setFlashMode(UFlashMode mode) async {
if (!value.capabilities.flash && mode != UFlashMode.off) return;
await _set("setFlashMode", <String, Object?>{"mode": mode.name});
_emit(value.copyWith(flash: mode, torchOn: mode == UFlashMode.torch));
}