Created with <3 with dartpad.dev.
Created
August 26, 2022 14:25
-
-
Save Deleplace/ba0a840363eda2fbb464b0a6b7f9bde0 to your computer and use it in GitHub Desktop.
Iterate over list indexes and values
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:collection/collection.dart'; | |
main() { | |
final items = ['a', 'b']; | |
items.forEachIndexed((i, value) { | |
print('index=$i, value=$value'); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment