Skip to content

Instantly share code, notes, and snippets.

@your-diary
Created May 11, 2023 04:14
Show Gist options
  • Save your-diary/8c453aeeae382707e9ecbfc26e55da5c to your computer and use it in GitHub Desktop.
Save your-diary/8c453aeeae382707e9ecbfc26e55da5c to your computer and use it in GitHub Desktop.
enum Color { red, blue, green }
void main() {
final color = Color.red;
switch (color) {
Color.red => "red",
Color.blue => "blue",
Color.green => "green",
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment