Created
April 29, 2022 16:50
-
-
Save AbdullohBahromjonov/56f225b58f40b112fccfd7ef5036f027 to your computer and use it in GitHub Desktop.
Enumeration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Weekdays { | |
monday, | |
tuesday, | |
wednesday, | |
thursday, | |
friday, | |
saturday, | |
sunday | |
} | |
void main() { | |
final firstDay = Weekdays.monday; | |
final allDays = Weekdays.values.forEach((day){ | |
print(day); | |
}); | |
print(firstDay); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment