@@ -39,7 +39,7 @@ Future<T?> showNativeDialog<T>(
3939 if (dialogContext.mounted) Navigator .of (dialogContext).pop (result);
4040 },
4141 isDestructiveAction: action.isDestructiveAction,
42- child: Text (action.text),
42+ child: Text (action.text, style : action.textStyle ),
4343 ),
4444 )
4545 .toList (),
@@ -60,7 +60,7 @@ Future<T?> showNativeDialog<T>(
6060 final result = await action.onTap ();
6161 if (dialogContext.mounted) Navigator .of (dialogContext).pop (result);
6262 },
63- child: Text (action.text),
63+ child: Text (action.text, style : action.textStyle ),
6464 ),
6565 )
6666 .toList (),
@@ -72,7 +72,7 @@ Future<T?> showNativeDialog<T>(
7272/// A dialog action which is used to show the actions of a native dialog. Tapping a action will also close the dialog.
7373class DialogAction <T > {
7474 /// 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 });
7676
7777 /// The text of the action.
7878 final String text;
@@ -82,4 +82,7 @@ class DialogAction<T> {
8282
8383 /// Whether the action is a destructive action. This is only used on iOS.
8484 final bool isDestructiveAction;
85+
86+ /// The style of the action text.
87+ final TextStyle ? textStyle;
8588}
0 commit comments