first commit
This commit is contained in:
12
lib/services/qr_service_native.dart
Normal file
12
lib/services/qr_service_native.dart
Normal file
@@ -0,0 +1,12 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user