Skip to content

Commit 126afb3

Browse files
committed
blog: edit dart add List.generate
1 parent 1f92fc3 commit 126afb3

File tree

1 file changed

+2
-0
lines changed
  • content/blog/2025/02/25/250225-dart

1 file changed

+2
-0
lines changed

content/blog/2025/02/25/250225-dart/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,9 @@ Set<String> opSetIf = {
10631063
};
10641064
10651065
List<int> opListFor = [0, for (int i = 1; i < 5; i++) i];
1066+
List<int> opListGenerate = List.generate(5, (index) => index);
10661067
// [0,1,2,3,4]
1068+
10671069
```
10681070

10691071

0 commit comments

Comments
 (0)