isOn method

  1. @override
Future<bool> isOn()

Query if the camera is turned on.
Return true : camera turned on, false : camera turned off

Implementation

@override
Future<bool> isOn() async {
  var params = <String, dynamic>{};
  params.putIfAbsent("userId", () => userId);

  return await methodChannel
      .invokeMethod<bool>('isOn', params)
      .then<bool>((bool? value) => value ?? false);
}