13 lines
320 B
Dart
13 lines
320 B
Dart
import 'package:flutter/services.dart';
|
|
|
|
const _channel = MethodChannel('com.rapollo/qr_scanner');
|
|
|
|
Future<String?> decodeQRFromBytes(Uint8List bytes) async {
|
|
try {
|
|
final result = await _channel.invokeMethod<String>('decodeQRFromBytes', bytes);
|
|
return result;
|
|
} on PlatformException {
|
|
return null;
|
|
}
|
|
}
|