mapi<B1, B2, C> method
Maps a map with an index and an optional option.
Implementation
Map<B1, B2> mapi<B1, B2, C>(
MapEntry<B1, B2> Function(A1 e1, A2 e2, int index, C? option) mapper, {
List<C> options = const [],
}) {
var index = 0;
return this.map((e1, e2) {
final option = options.length > index ? options[index] : null;
return mapper(e1, e2, index++, option);
});
}