@@ -9,22 +9,57 @@ import '../flutter_material_pickers.dart';
9
9
/// Allows selection of a number via a slot machine carousel
10
10
Future <int ?> showMaterialNumberPicker ({
11
11
required BuildContext context,
12
+
13
+ /// The title for the dialog box
12
14
String ? title,
15
+
16
+ /// The lowest or starting number for the selections
13
17
required final int minNumber,
18
+
19
+ /// The highest or max number for the selections
14
20
required final int maxNumber,
21
+
22
+ /// The number to begin on
15
23
final int ? selectedNumber,
24
+
25
+ /// The number step, in case you don't to skip ranges.
16
26
final int step = 1 ,
27
+
28
+ /// The dialog header color (overrides theme)
17
29
Color ? headerColor,
30
+
31
+ /// The dialog header text color (overrides theme)
18
32
Color ? headerTextColor,
33
+
34
+ /// The dialog background color (overrides theme)
19
35
Color ? backgroundColor,
36
+
37
+ /// The button text color (overrides theme)
20
38
Color ? buttonTextColor,
39
+
40
+ /// Text to display in the confirm button
21
41
String ? confirmText,
42
+
43
+ /// Text to display in the cancel button
22
44
String ? cancelText,
45
+
46
+ /// Used to restrict how tall the dialog can be.
23
47
double ? maxLongSide,
48
+
49
+ /// Used to restrict how wide the dialog can be.
24
50
double ? maxShortSide,
51
+
52
+ /// Function that gets called when the value is changed
25
53
ValueChanged <int >? onChanged,
54
+
55
+ /// Function that gets called when the confirm button is pressed
26
56
VoidCallback ? onConfirmed,
57
+
58
+ /// Function that gets called when the cancel button is pressed
27
59
VoidCallback ? onCancelled,
60
+
61
+ /// Function that is called when each items renders which can be used to transform the content
62
+ /// This is helpful, for example, to provide translations to other languages
28
63
Transformer <int >? transformer,
29
64
}) {
30
65
List <int > items = [];
0 commit comments