@@ -138,6 +138,15 @@ class FormBuilderDateTimePicker extends StatefulWidget {
138
138
final double cursorWidth;
139
139
final TextCapitalization textCapitalization;
140
140
final bool alwaysUse24HourFormat;
141
+ final RouteSettings routeSettings;
142
+ final String cancelText;
143
+ final String confirmText;
144
+ final String errorFormatText;
145
+ final String errorInvalidText;
146
+ final String fieldHintText;
147
+ final String fieldLabelText;
148
+ final String helpText;
149
+ final DatePickerEntryMode initialEntryMode;
141
150
142
151
FormBuilderDateTimePicker ({
143
152
Key key,
@@ -196,6 +205,15 @@ class FormBuilderDateTimePicker extends StatefulWidget {
196
205
this .strutStyle,
197
206
this .useRootNavigator = true ,
198
207
this .alwaysUse24HourFormat = false ,
208
+ this .routeSettings,
209
+ this .cancelText,
210
+ this .confirmText,
211
+ this .errorFormatText,
212
+ this .errorInvalidText,
213
+ this .fieldHintText,
214
+ this .fieldLabelText,
215
+ this .helpText,
216
+ this .initialEntryMode,
199
217
}) : super (key: key);
200
218
201
219
final StrutStyle strutStyle;
@@ -261,7 +279,7 @@ class _FormBuilderDateTimePickerState extends State<FormBuilderDateTimePicker> {
261
279
262
280
return MediaQuery (
263
281
data: MediaQuery .of (context).copyWith (
264
- alwaysUse24HourFormat: true ,
282
+ alwaysUse24HourFormat: widget.alwaysUse24HourFormat ,
265
283
),
266
284
child: DateTimeField (
267
285
key: _fieldKey,
@@ -368,6 +386,15 @@ class _FormBuilderDateTimePickerState extends State<FormBuilderDateTimePicker> {
368
386
locale: widget.locale,
369
387
textDirection: widget.textDirection,
370
388
useRootNavigator: widget.useRootNavigator,
389
+ routeSettings: widget.routeSettings,
390
+ cancelText: widget.cancelText,
391
+ confirmText: widget.confirmText,
392
+ errorFormatText: widget.errorFormatText,
393
+ errorInvalidText: widget.errorInvalidText,
394
+ fieldHintText: widget.fieldHintText,
395
+ fieldLabelText: widget.fieldLabelText,
396
+ helpText: widget.helpText,
397
+ initialEntryMode: widget.initialEntryMode,
371
398
builder: widget.builder ??
372
399
(BuildContext context, Widget child) {
373
400
return MediaQuery (
@@ -399,6 +426,7 @@ class _FormBuilderDateTimePickerState extends State<FormBuilderDateTimePicker> {
399
426
);
400
427
},
401
428
useRootNavigator: widget.useRootNavigator,
429
+ routeSettings: widget.routeSettings,
402
430
).then (
403
431
(result) {
404
432
return result ??
0 commit comments