monthNumToName function

String monthNumToName(
  1. int monthNum
)

Implementation

String monthNumToName(int monthNum) {
  return monthNum == DateTime.january
      ? "January"
      : monthNum == DateTime.february
          ? "February"
          : monthNum == DateTime.march
              ? "March"
              : monthNum == DateTime.april
                  ? "April"
                  : monthNum == DateTime.may
                      ? "May"
                      : monthNum == DateTime.june
                          ? "June"
                          : monthNum == DateTime.july
                              ? "July"
                              : monthNum == DateTime.august
                                  ? "August"
                                  : monthNum == DateTime.september
                                      ? "September"
                                      : monthNum == DateTime.october
                                          ? "October"
                                          : monthNum ==
                                                  DateTime.november
                                              ? "November"
                                              : monthNum ==
                                                      DateTime
                                                          .december
                                                  ? "December"
                                                  : "Unknown";
}