Reformating with dartfm
This commit is contained in:
parent
fa1ad93511
commit
e1146cbe64
1 changed files with 30 additions and 30 deletions
|
@ -29,38 +29,38 @@ class DateTimeFormField extends FormField<DateTime> {
|
||||||
this.initialDatePickerMode = DatePickerMode.day,
|
this.initialDatePickerMode = DatePickerMode.day,
|
||||||
this.mode = DateFieldPickerMode.date,
|
this.mode = DateFieldPickerMode.date,
|
||||||
}) : super(
|
}) : super(
|
||||||
key: key,
|
key: key,
|
||||||
initialValue: initialValue,
|
initialValue: initialValue,
|
||||||
onSaved: onSaved,
|
onSaved: onSaved,
|
||||||
validator: validator,
|
validator: validator,
|
||||||
autovalidate: autovalidate,
|
autovalidate: autovalidate,
|
||||||
enabled: enabled,
|
enabled: enabled,
|
||||||
builder: (FormFieldState<DateTime> field) {
|
builder: (FormFieldState<DateTime> field) {
|
||||||
final _DateFormFieldState state = field;
|
final _DateFormFieldState state = field;
|
||||||
|
|
||||||
void onChangedHandler(DateTime value) {
|
void onChangedHandler(DateTime value) {
|
||||||
if (onDateSelected != null) {
|
if (onDateSelected != null) {
|
||||||
onDateSelected(value);
|
onDateSelected(value);
|
||||||
}
|
}
|
||||||
field.didChange(value);
|
field.didChange(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return DateTimeField(
|
return DateTimeField(
|
||||||
label: label,
|
label: label,
|
||||||
firstDate: firstDate,
|
firstDate: firstDate,
|
||||||
lastDate: lastDate,
|
lastDate: lastDate,
|
||||||
decoration: decoration,
|
decoration: decoration,
|
||||||
initialDatePickerMode: initialDatePickerMode,
|
initialDatePickerMode: initialDatePickerMode,
|
||||||
dateFormat: dateFormat,
|
dateFormat: dateFormat,
|
||||||
errorText: state.errorText,
|
errorText: state.errorText,
|
||||||
onDateSelected: onChangedHandler,
|
onDateSelected: onChangedHandler,
|
||||||
selectedDate: state.value,
|
selectedDate: state.value,
|
||||||
enabled: enabled,
|
enabled: enabled,
|
||||||
mode: mode,
|
mode: mode,
|
||||||
textStyle: textStyle,
|
textStyle: textStyle,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
/// (optional) A callback that will be triggered whenever a new
|
/// (optional) A callback that will be triggered whenever a new
|
||||||
/// DateTime is selected
|
/// DateTime is selected
|
||||||
|
|
Loading…
Reference in a new issue