refactor: Use adaptive dialog action
This commit is contained in:
parent
416cdc139f
commit
d1e211adee
9 changed files with 60 additions and 25 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue