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
/// The position of an [OudsAlertMessageActionLink]in the alert_message message.
28
+
/// Defines the position of an [OudsAlertMessageActionLink]within the alert message.
13
29
enumOudsAlertMessageActionLinkPosition {
14
-
///The link is displayed at the bottom of the alert_message message below the main message content.
15
-
/// Recommended for mobile or narrow layouts, or when the text spans multiple lines.
16
-
/// This vertical structure improves clarity and ensures the action remains
17
-
/// visible after the message is read.
30
+
///The link is displayed at the bottom of the alert message, below the main content.
31
+
///
32
+
/// This is recommended for mobile or narrow layouts, or when the text spans multiple lines.
33
+
/// This vertical structure improves clarity and ensures the action remains visible.
18
34
bottom,
19
35
20
-
/// The link is displayed at the top-end corner of the alert_message message.
21
-
/// Best suited for wider layouts or short, single-line alerts where horizontal
22
-
/// alignment keeps content compact and balanced.
36
+
/// The link is displayed at the top-end corner of the alert message.
37
+
///
38
+
/// This is best suited for wider layouts or short, single-line alerts where
39
+
/// horizontal alignment keeps the content compact and balanced.
23
40
topEnd,
24
41
}
25
42
26
-
/// Represents an action that can be taken on an alert_message message.
43
+
/// Represents a clickable action within an [OudsAlertMessage].
27
44
classOudsAlertMessageActionLink {
28
-
/// The text label for the action.
45
+
/// The text label for the action link.
29
46
finalString text;
30
47
31
-
/// The callback to be invoked when the action is pressed.
48
+
/// The callback to be invoked when the action link is pressed.
32
49
finalVoidCallback? onClick;
33
50
34
-
/// The position of the link within the alert_message message.
51
+
/// The position of the link within the alert message.
52
+
/// Defaults to [OudsAlertMessageActionLinkPosition.bottom].
35
53
OudsAlertMessageActionLinkPosition position;
36
54
55
+
/// Creates a new action link for an [OudsAlertMessage].
56
+
///
57
+
/// - [text]: The label for the action.
58
+
/// - [onClick]: The callback to execute when pressed.
59
+
/// - [position]: The position of the link, defaults to `bottom`.
37
60
OudsAlertMessageActionLink({
38
61
requiredthis.text,
39
62
requiredthis.onClick,
@@ -72,8 +95,7 @@ class OudsAlertMessageActionLink {
72
95
/// Add this list when you need to highlight multiple points, such as service features, plan details, or next steps. Each bullet should be short and written
73
96
/// as a clear phrase or fragment — avoid long sentences or complex structures.
74
97
///
75
-
///
76
-
/// ## Usage examples:
98
+
/// ## Usage Example:
77
99
///
78
100
/// ```dart
79
101
/// OudsAlertMessage(
@@ -84,6 +106,7 @@ class OudsAlertMessageActionLink {
84
106
/// ```
85
107
///
86
108
classOudsAlertMessageextendsStatefulWidget {
109
+
/// Creates an OudsAlertMessage.
87
110
constOudsAlertMessage({
88
111
super.key,
89
112
requiredthis.label,
@@ -94,16 +117,22 @@ class OudsAlertMessage extends StatefulWidget {
94
117
this.bulletList,
95
118
});
96
119
120
+
/// The main message displayed in the alert.
97
121
finalString label;
98
122
123
+
/// Optional supplementary text providing more detail.
99
124
finalString? description;
100
125
126
+
/// The status of the alert, which determines its background color and icon.
101
127
finalOudsIconStatus? status;
102
128
129
+
/// A callback invoked when the close button is clicked. If `null`, the close button is not shown.
103
130
finalVoidCallback? onClose;
104
131
132
+
/// An optional clickable link to trigger an action.
105
133
finalOudsAlertMessageActionLink? actionLink;
106
134
135
+
/// An optional list of bullet points to display below the main content.
107
136
finalList<String>? bulletList;
108
137
109
138
@override
@@ -113,10 +142,12 @@ class OudsAlertMessage extends StatefulWidget {
0 commit comments