curWeekdayAsString top-level property

String curWeekdayAsString

Returns current day of the week as a text String.

Implementation

String get curWeekdayAsString {
  Map<int, String> days = {
    1: "Monday",
    2: "Tuesday",
    3: "Wednesday",
    4: "Thursday",
    5: "Friday",
    6: "Saturday",
    7: "Sunday"
  };
  var now = DateTime.now();
  return days[now.weekday];
}