refactor: Enable lint use_build_context_synchronously
This commit is contained in:
parent
a3fc1bff01
commit
3296c0d92d
50 changed files with 490 additions and 293 deletions
|
|
@ -82,6 +82,7 @@ class KeyVerificationPageState extends State<KeyVerificationDialog> {
|
|||
},
|
||||
);
|
||||
if (valid.error != null) {
|
||||
if (!mounted) return;
|
||||
await showOkAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
|
|
@ -178,9 +179,10 @@ class KeyVerificationPageState extends State<KeyVerificationDialog> {
|
|||
);
|
||||
buttons.add(
|
||||
AdaptiveDialogAction(
|
||||
onPressed: () => widget.request.rejectVerification().then(
|
||||
(_) => Navigator.of(context, rootNavigator: false).pop(false),
|
||||
),
|
||||
onPressed: () => widget.request.rejectVerification().then((_) {
|
||||
if (!context.mounted) return;
|
||||
Navigator.of(context, rootNavigator: false).pop(false);
|
||||
}),
|
||||
child: Text(
|
||||
L10n.of(context).reject,
|
||||
style: TextStyle(color: theme.colorScheme.error),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue