mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-25 23:14:18 +03:00
fix warning: Don't use 'BuildContext's across async gaps
This commit is contained in:
parent
752665e122
commit
cc5c1cd898
@ -22,6 +22,7 @@ import 'package:logging/logging.dart';
|
||||
import '../../app/logging.dart';
|
||||
import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../desktop/models.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../models.dart';
|
||||
@ -184,10 +185,14 @@ class _FidoPinDialogState extends ConsumerState<FidoPinDialog> {
|
||||
} else {
|
||||
errorMessage = e.toString();
|
||||
}
|
||||
showMessage(
|
||||
context,
|
||||
l10n.l_set_pin_failed(errorMessage),
|
||||
duration: const Duration(seconds: 4),
|
||||
await ref.read(withContextProvider)(
|
||||
(context) async {
|
||||
showMessage(
|
||||
context,
|
||||
l10n.l_set_pin_failed(errorMessage),
|
||||
duration: const Duration(seconds: 4),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user