@@ -39,7 +39,7 @@ Future<T?> showNativeDialog<T>(
39
39
if (dialogContext.mounted) Navigator .of (dialogContext).pop (result);
40
40
},
41
41
isDestructiveAction: action.isDestructiveAction,
42
- child: Text (action.text),
42
+ child: Text (action.text, style : action.textStyle ),
43
43
),
44
44
)
45
45
.toList (),
@@ -60,7 +60,7 @@ Future<T?> showNativeDialog<T>(
60
60
final result = await action.onTap ();
61
61
if (dialogContext.mounted) Navigator .of (dialogContext).pop (result);
62
62
},
63
- child: Text (action.text),
63
+ child: Text (action.text, style : action.textStyle ),
64
64
),
65
65
)
66
66
.toList (),
@@ -72,7 +72,7 @@ Future<T?> showNativeDialog<T>(
72
72
/// A dialog action which is used to show the actions of a native dialog. Tapping a action will also close the dialog.
73
73
class DialogAction <T > {
74
74
/// Creates a [DialogAction] .
75
- const DialogAction ({required this .text, required this .onTap, this .isDestructiveAction = false });
75
+ const DialogAction ({required this .text, required this .onTap, this .isDestructiveAction = false , this .textStyle });
76
76
77
77
/// The text of the action.
78
78
final String text;
@@ -82,4 +82,7 @@ class DialogAction<T> {
82
82
83
83
/// Whether the action is a destructive action. This is only used on iOS.
84
84
final bool isDestructiveAction;
85
+
86
+ /// The style of the action text.
87
+ final TextStyle ? textStyle;
85
88
}
0 commit comments