formatMonthYear method

  1. @override
String formatMonthYear(
  1. DateTime date

Formats the month and the year of the given date.

The returned string does not contain the day of the month. This appears in the date picker invoked using showDatePicker.


String formatMonthYear(DateTime date) {
  final String year = formatYear(date);
  final String month = _months[date.month - DateTime.january];
  return '$month $year';