Weekday enum

An enum that represents the days of the week.

The Weekday enum is a simple enumeration that represents the days of the week. Each enumeration value has a corresponding label that represents the name of the day.

Example usage:

final monday = Weekday.monday;
print(monday.label); // Prints: "Monday"
Inheritance
Implemented types
Available extensions

Values

monday → const Weekday

Represents Monday.

const Weekday("Monday")
tuesday → const Weekday

Represents Tuesday.

const Weekday("Tuesday")
wednesday → const Weekday

Represents Wednesday.

const Weekday("Wednesday")
thursday → const Weekday

Represents Thursday.

const Weekday("Thursday")
friday → const Weekday

Represents Friday.

const Weekday("Friday")
saturday → const Weekday

Represents Saturday.

const Weekday("Saturday")
sunday → const Weekday

Represents Sunday.

const Weekday("Sunday")

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
label String
The label that corresponds to this Weekday object.
final
labelShort String

Available on Weekday, provided by the WeekdayExtension extension

Returns the first three characters of the label for this Weekday object.
no setter
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson({JsonCodec codec = const JsonCodec()}) String
Returns a JSON-encoded string representation of the object.
override
toMap() Map<String, String>
Converts this object object to a JSON like map.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromMap(JsonMap map) Weekday
Creates a new instance of this object from a JSON like map.

Constants

values → const List<Weekday>
A constant List of the values in this enum, in order of their declaration.