setFlashMode method

Future<bool> setFlashMode(
  1. bool status
)

打开/关闭 闪光灯 Turn flash on / off

Implementation

Future<bool> setFlashMode(bool status) async {
  if (!_supportPlatform) return false;
  final bool? state =
      await channel.invokeMethod<bool?>('setFlashMode', status);
  return state ?? false;
}