@@ -99,6 +99,7 @@ class FormBuilderDateTimePicker extends FormBuilderFieldDecoration<DateTime> {
9999 final VoidCallback ? onEditingComplete;
100100
101101 final InputCounterWidgetBuilder ? buildCounter;
102+ final MouseCursor ? mouseCursor;
102103
103104 final Radius ? cursorRadius;
104105 final Color ? cursorColor;
@@ -178,6 +179,7 @@ class FormBuilderDateTimePicker extends FormBuilderFieldDecoration<DateTime> {
178179 this .textInputAction,
179180 this .onEditingComplete,
180181 this .buildCounter,
182+ this .mouseCursor,
181183 this .cursorRadius,
182184 this .cursorColor,
183185 this .keyboardAppearance,
@@ -219,6 +221,7 @@ class FormBuilderDateTimePicker extends FormBuilderFieldDecoration<DateTime> {
219221 style: style,
220222 onEditingComplete: onEditingComplete,
221223 buildCounter: buildCounter,
224+ mouseCursor: mouseCursor,
222225 cursorColor: cursorColor,
223226 cursorRadius: cursorRadius,
224227 cursorWidth: cursorWidth,
@@ -295,10 +298,11 @@ class _FormBuilderDateTimePickerState extends FormBuilderFieldDecorationState<
295298 newValue = await _showDatePicker (context, currentValue);
296299 break ;
297300 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)) ;
300303 break ;
301304 case InputType .both:
305+ if (! context.mounted) return null ;
302306 final date = await _showDatePicker (context, currentValue);
303307 if (date != null ) {
304308 if (! mounted) break ;
0 commit comments