generateDateRangePickerFormat static method

String generateDateRangePickerFormat(
  1. String? dateFormat,
  2. BrnDateTimeRangePickerMode pickerMode
)

Implementation

static String generateDateRangePickerFormat(
    String? dateFormat, BrnDateTimeRangePickerMode pickerMode) {
  if (dateFormat != null && dateFormat.isNotEmpty) {
    return dateFormat;
  }
  switch (pickerMode) {
    case BrnDateTimeRangePickerMode.date:
      return datetimeRangePickerDateFormat;
    case BrnDateTimeRangePickerMode.time:
      return datetimeRangePickerTimeFormat;
  }
}