Reformating with dartfm

This commit is contained in:
Gaspard Merten 2020-09-10 16:04:14 +02:00
parent fa1ad93511
commit e1146cbe64

View file

@ -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