You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/src/platform/dialog_helper.dart
+10-8Lines changed: 10 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -83,28 +83,30 @@ class DialogHelper {
83
83
/// Shows a simple text dialog with the given [title] and [text].
84
84
///
85
85
/// Compare [showWidgetDialog] for parameter details.
86
-
staticFutureshowTextDialog(
86
+
staticFuture<T?>showTextDialog<T>(
87
87
BuildContext context,
88
88
String title,
89
89
String text, {
90
90
List<Widget>? actions,
91
91
String? okActionText,
92
92
String? cancelActionText,
93
-
}) {
94
-
returnshowWidgetDialog(context, Text(text),
93
+
}) =>
94
+
showWidgetDialog<T>(
95
+
context,
96
+
Text(text),
95
97
title: title,
96
98
actions: actions,
97
99
okActionText: okActionText,
98
-
cancelActionText: cancelActionText);
99
-
}
100
+
cancelActionText: cancelActionText,
101
+
);
100
102
101
103
/// Shows a dialog with the given [content].
102
104
///
103
105
/// Set the [title] to display the title on top
104
106
/// Specify custom [actions] to provide dialog specific actions, alternatively specify the [defaultActions]. Without [actions] or [defaultActions] only and OK button is shown.
105
107
/// Specify the [okActionText] and [cancelActionText] when no icons should be used for the default actions.
106
108
/// When default actions are used, this method will return `true` when the user pressed `ok` and `false` after selecting `cancel`.
0 commit comments