diff --git a/lib/android/qr_scanner/qr_scanner_provider.dart b/lib/android/qr_scanner/qr_scanner_provider.dart index 43bb8936..f61faebc 100644 --- a/lib/android/qr_scanner/qr_scanner_provider.dart +++ b/lib/android/qr_scanner/qr_scanner_provider.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:yubico_authenticator/app/state.dart'; import 'package:yubico_authenticator/cancellation_exception.dart'; +import 'package:yubico_authenticator/theme.dart'; import 'qr_scanner_view.dart'; @@ -13,7 +14,8 @@ class AndroidQrScanner implements QrScanner { Future scanQr([String? _]) async { var scannedCode = await _withContext( (context) async => await Navigator.of(context).push(PageRouteBuilder( - pageBuilder: (_, __, ___) => const QrScannerView(), + pageBuilder: (_, __, ___) => + Theme(data: AppTheme.darkTheme, child: const QrScannerView()), transitionDuration: const Duration(seconds: 0), reverseTransitionDuration: const Duration(seconds: 0), ))); diff --git a/lib/android/qr_scanner/qr_scanner_view.dart b/lib/android/qr_scanner/qr_scanner_view.dart index 9208e870..14bb5b81 100755 --- a/lib/android/qr_scanner/qr_scanner_view.dart +++ b/lib/android/qr_scanner/qr_scanner_view.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:qrscanner_zxing/qrscanner_zxing_view.dart'; import '../../oath/models.dart'; @@ -82,14 +81,6 @@ class _QrScannerViewState extends State { void initState() { super.initState(); _status = ScanStatus.scanning; - SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []); - } - - @override - void dispose() { - SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge, - overlays: SystemUiOverlay.values); - super.dispose(); } @override