Created
June 13, 2019 13:53
-
-
Save vadimtsushko/66d42c47208d325d3982a3a8c39f7f21 to your computer and use it in GitHub Desktop.
test enum
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 Direction {up, down} | |
testEnum(Direction direction) { | |
switch (direction) { | |
case Direction.up: | |
print('Up'); | |
break; | |
case Direction.down: | |
print('down'); | |
break; | |
} | |
} | |
void main() { | |
testEnum(Direction.up); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment