Skip to content

Instantly share code, notes, and snippets.

@MariaMelnik
Created May 20, 2021 17:49
Show Gist options
  • Save MariaMelnik/8ceb8c1827abdd9bdab86954deab90d7 to your computer and use it in GitHub Desktop.
Save MariaMelnik/8ceb8c1827abdd9bdab86954deab90d7 to your computer and use it in GitHub Desktop.
+ vs *
void main() {
final inter = 23.96;
final minVal = 23.6;
final list1 = List.generate(5, (i) => minVal + i * inter);
print(list1);
int i = 0;
double val = minVal;
while (i < 5) {
print(val);
val += inter;
i++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment