Skip to content

Instantly share code, notes, and snippets.

@mj-hd
Created June 1, 2022 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mj-hd/8e6dfae5563935294b0389033cb3c613 to your computer and use it in GitHub Desktop.
Save mj-hd/8e6dfae5563935294b0389033cb3c613 to your computer and use it in GitHub Desktop.
dart_switch_loop.dart
void main() {
int a = 0;
// equivalent to while
first:
switch (a) {
second:
default:
a++;
switch (a) {
case 10:
print('$a!!');
break first;
default:
print('$a');
continue second;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment