Arrasia donde darte
int i = [1,2,3,4,5,6].firstWhere((element) => element==1);
CodePadding
int i = [1,2,3,4,5,6].firstWhere((element) => element==1);