getDatesBetweenInString static method

List<String> getDatesBetweenInString(
  1. DateTime date1,
  2. DateTime date2, {
  3. String dateFormat = FORMAT_yyyy_MM_dd,
  4. bool inclusive = true,
})

Implementation

static List<String> getDatesBetweenInString(DateTime date1, DateTime date2, {String dateFormat = FORMAT_yyyy_MM_dd, bool inclusive = true}) {
  final datesBetween = getDatesBetween(date1, date2, inclusive: inclusive);

  List<String> datesList = <String>[];

  for(DateTime d in datesBetween){
    datesList.add(dateToString(d, format: dateFormat));
  }

  return datesList;
}