myList.asMap().entries.map((entry) {
int idx = entry.key;
String val = entry.value;
return something;
}
userBoard.map((element) {
// get index
var index = userBoard.indexOf(element);
return Container(
);
}).toList()
import 'package:collection/collection.dart';
void main() {
final fruitList = ['apple', 'orange', 'mango'];
final withIndices = fruitList.mapIndexed((index, fruit) => "$index - $fruit");
print(withIndices);
}
userBoard.map((element) {
// get index
var index = userBoard.indexOf(element);
return Container(
);
}).toList()
userBoard.map((element) {
// get index
var index = userBoard.indexOf(element);
return Container(
);
}).toList()