switchCamera static method

Future<Map?> switchCamera()

Implementation

static Future<Map<dynamic, dynamic>?> switchCamera() async {
  try {
    final result = await channel.invokeMethod<Map<dynamic, dynamic>>(
      'switchCamera',
    );
    return result;
  } on PlatformException catch (e) {
    if (kDebugMode) {
      print('Switch camera error: ${e.code} - ${e.message}');
    }
    rethrow;
  }
}