mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-26 10:33:15 +03:00
Force dark theme in scanner and keep chrome.
This commit is contained in:
parent
4584a48621
commit
15198466b5
@ -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<String?> 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),
|
||||
)));
|
||||
|
@ -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<QrScannerView> {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user