refactor: Use adaptive dialog action

This commit is contained in:
Krille 2024-10-18 15:49:46 +02:00
commit d1e211adee
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
9 changed files with 60 additions and 25 deletions

View file

@ -6,6 +6,7 @@ import 'package:async/async.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:fluffychat/utils/localized_exception_extension.dart';
import 'package:fluffychat/widgets/adaptive_dialog_action.dart';
/// Displays a loading dialog which reacts to the given [future]. The dialog
/// will be dismissed and the value will be returned when the future completes.
@ -120,7 +121,7 @@ class LoadingDialogState<T> extends State<LoadingDialog> {
actions: exception == null
? null
: [
TextButton(
AdaptiveDialogAction(
onPressed: () => Navigator.of(context).pop<Result<T>>(
Result.error(
exception,