refactor: Enable lint use_build_context_synchronously

This commit is contained in:
Christian Kußowski 2026-03-25 10:42:17 +01:00
commit 3296c0d92d
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
50 changed files with 490 additions and 293 deletions

View file

@ -53,16 +53,18 @@ class ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
onSelected: (choice) async {
switch (choice) {
case ChatPopupMenuActions.leave:
final l10n = L10n.of(context);
final router = GoRouter.of(context);
final confirmed = await showOkCancelAlertDialog(
context: context,
title: L10n.of(context).areYouSure,
message: L10n.of(context).archiveRoomDescription,
okLabel: L10n.of(context).leave,
cancelLabel: L10n.of(context).cancel,
title: l10n.areYouSure,
message: l10n.archiveRoomDescription,
okLabel: l10n.leave,
cancelLabel: l10n.cancel,
isDestructive: true,
);
if (confirmed != OkCancelResult.ok) return;
if (!context.mounted) return;
final result = await showFutureLoadingDialog(
context: context,
future: () => widget.room.leave(),