parseDatePickerMode function

DatePickerMode? parseDatePickerMode(
  1. String? value, [
  2. DatePickerMode? defValue
])

Implementation

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