mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-23 10:11:52 +03:00
pre-review cleanup
This commit is contained in:
parent
fefee65c8e
commit
af828dde4e
@ -93,7 +93,7 @@ class AndroidQrScanner implements QrScanner {
|
||||
allowMultiple: false,
|
||||
lockParentWindow: true,
|
||||
withData: true,
|
||||
dialogTitle: 'Select file with QR code');
|
||||
dialogTitle: l10n.l_qr_select_file);
|
||||
|
||||
if (result == null || !result.isSinglePick) {
|
||||
// no result
|
||||
|
@ -16,13 +16,12 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:yubico_authenticator/android/qr_scanner/qr_scanner_provider.dart';
|
||||
|
||||
import '../keys.dart' as keys;
|
||||
import 'qr_scanner_scan_status.dart';
|
||||
|
||||
class QRScannerUI extends ConsumerWidget {
|
||||
class QRScannerUI extends StatelessWidget {
|
||||
final ScanStatus status;
|
||||
final Size screenSize;
|
||||
final GlobalKey overlayWidgetKey;
|
||||
@ -34,7 +33,7 @@ class QRScannerUI extends ConsumerWidget {
|
||||
required this.overlayWidgetKey});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
|
||||
return Stack(
|
||||
@ -75,32 +74,29 @@ class QRScannerUI extends ConsumerWidget {
|
||||
textScaleFactor: 0.7,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
OutlinedButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(
|
||||
AndroidQrScanner.kQrScannerRequestManualEntry);
|
||||
},
|
||||
key: keys.manualEntryButton,
|
||||
child: Text(
|
||||
l10n.s_enter_manually,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
)),
|
||||
const SizedBox(width: 16),
|
||||
OutlinedButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(
|
||||
AndroidQrScanner.kQrScannerRequestReadFromFile);
|
||||
},
|
||||
key: keys.readFromImage,
|
||||
child: Text(
|
||||
l10n.s_read_from_file,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
))
|
||||
],
|
||||
),
|
||||
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
OutlinedButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(
|
||||
AndroidQrScanner.kQrScannerRequestManualEntry);
|
||||
},
|
||||
key: keys.manualEntryButton,
|
||||
child: Text(
|
||||
l10n.s_enter_manually,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
)),
|
||||
const SizedBox(width: 16),
|
||||
OutlinedButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(
|
||||
AndroidQrScanner.kQrScannerRequestReadFromFile);
|
||||
},
|
||||
key: keys.readFromImage,
|
||||
child: Text(
|
||||
l10n.s_read_from_file,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
))
|
||||
])
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16)
|
||||
|
@ -506,6 +506,7 @@
|
||||
"l_qr_scanned": "Scanned QR code",
|
||||
"l_invalid_qr": "Invalid QR code",
|
||||
"l_qr_not_found": "No QR code found",
|
||||
"l_qr_select_file": "Select file with QR code",
|
||||
"l_qr_not_read": "Failed reading QR code: {message}",
|
||||
"@l_qr_not_read" : {
|
||||
"placeholders": {
|
||||
|
@ -30,10 +30,10 @@ import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../app/views/user_interaction.dart';
|
||||
import '../../core/state.dart';
|
||||
import '../../desktop/models.dart';
|
||||
import '../../exception/apdu_exception.dart';
|
||||
import '../../exception/cancellation_exception.dart';
|
||||
import '../../core/state.dart';
|
||||
import '../../desktop/models.dart';
|
||||
import '../../management/models.dart';
|
||||
import '../../widgets/choice_filter_chip.dart';
|
||||
import '../../widgets/file_drop_target.dart';
|
||||
@ -56,7 +56,6 @@ class OathAddAccountPage extends ConsumerStatefulWidget {
|
||||
final OathState? state;
|
||||
final List<OathCredential>? credentials;
|
||||
final CredentialData? credentialData;
|
||||
|
||||
const OathAddAccountPage(
|
||||
this.devicePath,
|
||||
this.state, {
|
||||
|
Loading…
Reference in New Issue
Block a user