setFlashMode method
打开/关闭 闪光灯 Turn flash on / off
Implementation
Future<bool> setFlashMode(FlashState status) async {
if (!_supportPlatform || !hasPreview) return false;
final bool? state =
await channel.invokeMethod<bool?>('setFlashMode', status.index);
return state ?? false;
}