getExposureState method
Get current exposure state
Implementation
@override
Future<Map<String, dynamic>> getExposureState() async {
try {
if (kDebugMode) {
debugPrint('QuickQR Scanner: Getting exposure state');
}
final result = await methodChannel.invokeMethod<Map<Object?, Object?>>('getExposureState');
final exposureState = Map<String, dynamic>.from(result ?? {});
if (kDebugMode) {
debugPrint('QuickQR Scanner: Exposure state - $exposureState');
}
return exposureState;
} on PlatformException catch (e) {
throw _handlePlatformException(e, 'getExposureState');
} catch (e) {
throw ScannerException(
ScannerErrorCode.internalError,
'Failed to get exposure state: $e',
);
}
}