getWhiteBalanceState method

  1. @override
Future<Map<String, dynamic>> getWhiteBalanceState()
override

Get current white balance state

Implementation

@override
Future<Map<String, dynamic>> getWhiteBalanceState() async {
  try {
    if (kDebugMode) {
      debugPrint('QuickQR Scanner: Getting white balance state');
    }

    final result = await methodChannel.invokeMethod<Map<Object?, Object?>>('getWhiteBalanceState');
    final whiteBalanceState = Map<String, dynamic>.from(result ?? {});

    if (kDebugMode) {
      debugPrint('QuickQR Scanner: White balance state - $whiteBalanceState');
    }

    return whiteBalanceState;
  } on PlatformException catch (e) {
    throw _handlePlatformException(e, 'getWhiteBalanceState');
  } catch (e) {
    throw ScannerException(
      ScannerErrorCode.internalError,
      'Failed to get white balance state: $e',
    );
  }
}