mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-22 08:22:16 +03:00
minimize changes
This commit is contained in:
parent
c7ea6bad53
commit
9e567b348c
@ -14,7 +14,8 @@ class ManagePasswordDialog extends ConsumerStatefulWidget {
|
||||
const ManagePasswordDialog(this.path, this.state, {super.key});
|
||||
|
||||
@override
|
||||
ConsumerState<ConsumerStatefulWidget> createState() => _ManagePasswordDialogState();
|
||||
ConsumerState<ConsumerStatefulWidget> createState() =>
|
||||
_ManagePasswordDialogState();
|
||||
}
|
||||
|
||||
class _ManagePasswordDialogState extends ConsumerState<ManagePasswordDialog> {
|
||||
@ -24,7 +25,9 @@ class _ManagePasswordDialogState extends ConsumerState<ManagePasswordDialog> {
|
||||
bool _currentIsWrong = false;
|
||||
|
||||
_submit() async {
|
||||
final result = await ref.read(oathStateProvider(widget.path).notifier).setPassword(_currentPassword, _newPassword);
|
||||
final result = await ref
|
||||
.read(oathStateProvider(widget.path).notifier)
|
||||
.setPassword(_currentPassword, _newPassword);
|
||||
if (result) {
|
||||
if (!mounted) return;
|
||||
Navigator.of(context).pop();
|
||||
|
@ -193,10 +193,10 @@ class _UnlockedViewState extends ConsumerState<_UnlockedView> {
|
||||
final used = credentials?.length ?? 0;
|
||||
final capacity = widget.oathState.version.isAtLeast(4) ? 32 : null;
|
||||
return [
|
||||
buildMenuItem(
|
||||
title: Text(AppLocalizations.of(context)!.oath_add_account,
|
||||
buildMenuItem(
|
||||
title: Text(AppLocalizations.of(context)!.oath_add_account,
|
||||
key: const Key('add oath account'),),
|
||||
leading: const Icon(Icons.person_add_alt_1),
|
||||
leading: const Icon(Icons.person_add_alt_1),
|
||||
trailing: capacity != null ? '$used/$capacity' : null,
|
||||
action: capacity == null || capacity > used
|
||||
? () {
|
||||
|
Loading…
Reference in New Issue
Block a user