diff --git a/lib/app/views/main_drawer.dart b/lib/app/views/main_drawer.dart index 801ddc24..13ec223b 100755 --- a/lib/app/views/main_drawer.dart +++ b/lib/app/views/main_drawer.dart @@ -3,7 +3,6 @@ import 'dart:io'; 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/management/views/keys.dart'; import '../../about_page.dart'; import '../../android/views/android_settings_page.dart'; @@ -100,10 +99,7 @@ class MainPageDrawer extends ConsumerWidget { if (shouldPop) Navigator.of(context).pop(); showBlurDialog( context: context, - builder: (context) => ManagementScreen( - data, - key: screenKey, - ), + builder: (context) => ManagementScreen(data), ); }, ), diff --git a/lib/management/views/management_screen.dart b/lib/management/views/management_screen.dart index 5995eb2b..e55f03ce 100755 --- a/lib/management/views/management_screen.dart +++ b/lib/management/views/management_screen.dart @@ -11,7 +11,7 @@ import '../../widgets/custom_icons.dart'; import '../../widgets/responsive_dialog.dart'; import '../models.dart'; import '../state.dart'; -import 'keys.dart'; +import 'keys.dart' as management_keys; final _mapEquals = const DeepCollectionEquality().equals; @@ -34,8 +34,8 @@ class _CapabilityForm extends StatelessWidget { @override Widget build(BuildContext context) { final keyPrefix = (type == _CapabilityType.usb) - ? usbCapabilityKeyPrefix - : nfcCapabilityKeyPrefix; + ? management_keys.usbCapabilityKeyPrefix + : management_keys.nfcCapabilityKeyPrefix; return Wrap( spacing: 8, runSpacing: 16, @@ -141,7 +141,9 @@ class _CapabilitiesForm extends StatelessWidget { class ManagementScreen extends ConsumerStatefulWidget { final YubiKeyData deviceData; - const ManagementScreen(this.deviceData, {super.key}); + + const ManagementScreen(this.deviceData) + : super(key: management_keys.screenKey); @override ConsumerState createState() => @@ -298,7 +300,7 @@ class _ManagementScreenState extends ConsumerState { actions: [ TextButton( onPressed: canSave ? _submitForm : null, - key: saveButtonKey, + key: management_keys.saveButtonKey, child: Text(AppLocalizations.of(context)!.mgmt_save), ), ],