scanQR method
Initiates a QR code scan operation.
Returns a ScanResult object containing the status and data obtained from the scan, or null if the operation was unsuccessful.
Implementation
@override
Future<ScanResult?> scanQR() async {
try {
final result = await methodChannel.invokeMethod<Map>('scanQR');
return ScanResult(status: 'success', data: result?['result']);
} catch (e) {
throw 'Error in scanQR method channel: $e';
}
}