Skip to content

Instantly share code, notes, and snippets.

@Aetet
Last active October 6, 2019 19:51
Show Gist options
  • Save Aetet/0fe6876ce5d6d8cfd60acad43a1b5e76 to your computer and use it in GitHub Desktop.
Save Aetet/0fe6876ce5d6d8cfd60acad43a1b5e76 to your computer and use it in GitHub Desktop.
void main() {
final a = 10;
final inside = a.clamp(1, 11);
final outsideMax = a.clamp(1, 9);
final outsideMin = a.clamp(11, 20);
print('inside: $inside, min: $outsideMin, max: $outsideMax');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment