hasVideoDevice method

  1. @override
Future<bool> hasVideoDevice()

Query if the user's device has a compatible camera.
Return true : compatible camera detected, false : no compatible camera detected

Implementation

@override
Future<bool> hasVideoDevice() async {
  if (Platform.isIOS) {
    return true;
  }
  var params = <String, dynamic>{};
  params.putIfAbsent("userId", () => userId);

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