@@ -99,6 +99,7 @@ class FormBuilderDateTimePicker extends FormBuilderFieldDecoration<DateTime> {
99
99
final VoidCallback ? onEditingComplete;
100
100
101
101
final InputCounterWidgetBuilder ? buildCounter;
102
+ final MouseCursor ? mouseCursor;
102
103
103
104
final Radius ? cursorRadius;
104
105
final Color ? cursorColor;
@@ -178,6 +179,7 @@ class FormBuilderDateTimePicker extends FormBuilderFieldDecoration<DateTime> {
178
179
this .textInputAction,
179
180
this .onEditingComplete,
180
181
this .buildCounter,
182
+ this .mouseCursor,
181
183
this .cursorRadius,
182
184
this .cursorColor,
183
185
this .keyboardAppearance,
@@ -219,6 +221,7 @@ class FormBuilderDateTimePicker extends FormBuilderFieldDecoration<DateTime> {
219
221
style: style,
220
222
onEditingComplete: onEditingComplete,
221
223
buildCounter: buildCounter,
224
+ mouseCursor: mouseCursor,
222
225
cursorColor: cursorColor,
223
226
cursorRadius: cursorRadius,
224
227
cursorWidth: cursorWidth,
@@ -295,10 +298,11 @@ class _FormBuilderDateTimePickerState extends FormBuilderFieldDecorationState<
295
298
newValue = await _showDatePicker (context, currentValue);
296
299
break ;
297
300
case InputType .time:
298
- final newTime = await _showTimePicker ( context, currentValue) ;
299
- newValue = null != newTime ? convert (newTime) : null ;
301
+ if ( ! context.mounted) return null ;
302
+ newValue = convert (await _showTimePicker (context, currentValue)) ;
300
303
break ;
301
304
case InputType .both:
305
+ if (! context.mounted) return null ;
302
306
final date = await _showDatePicker (context, currentValue);
303
307
if (date != null ) {
304
308
if (! mounted) break ;
0 commit comments