scanWithCamera method

  1. @override
Future<QrScanResult?> scanWithCamera(
  1. ScanOptions options
)
override

Starts the camera scanner with the given options

Implementation

@override
Future<QrScanResult?> scanWithCamera(ScanOptions options) async {
  try {
    final result = await methodChannel.invokeMethod<Map<String, dynamic>>(
      'scanWithCamera',
      options.toJson(),
    );

    if (result == null) return null;

    return QrScanResult.fromJson(Map<String, dynamic>.from(result));
  } on PlatformException catch (e) {
    throw _handlePlatformException(e);
  }
}