In dart there any equivalent to the common:
enumerate(List) -> Iterator((index, value) => f) or List.enumerate() -> Iterator((index, value) =>
There is a asMap method which converts the list to a map where the keys are the index and values are the element at index. Please take a look at the docs here.
asMap
Example:
List _sample = ['a','b','c']; _sample.asMap().forEach((index, value) => f);
Hope this helps!