parseDatePickerMode function
Implementation
DatePickerMode? parseDatePickerMode(String? value, [DatePickerMode? defValue]) {
if (value == null) {
return defValue;
}
return DatePickerMode.values.firstWhereOrNull(
(e) => e.name.toLowerCase() == value.toLowerCase()) ??
defValue;
}