List 颤振省道列表映射获取我单击的项目编号或文本?
如果我点击列表,我想得到一个字符串或地图编号int。我想转到另一个函数。像这样, 我有一张单子List 颤振省道列表映射获取我单击的项目编号或文本?,list,flutter,dictionary,dart,List,Flutter,Dictionary,Dart,如果我点击列表,我想得到一个字符串或地图编号int。我想转到另一个函数。像这样, 我有一张单子 List <String> konulistesi = <String> ["Max","Adam","Anna","Sophie","Alex",] 对于InkWell小部件的onTap方法,不应使用打印(索引)将为您提供数组的索引打印(索引+1)将为您提供数组的可计数索引。
List <String> konulistesi = <String> ["Max","Adam","Anna","Sophie","Alex",]
对于InkWell小部件的onTap方法,不应使用<代码>打印(索引)将为您提供数组的索引<代码>打印(索引+1)将为您提供数组的可计数索引。数组的索引在Dart中以0开头
而且,print(konuListesi[index])
将为您提供所选项目:
onTap: () {
print("Number of the Position or direkt Item");
print(index);
print(konuListesi[index]);
}),
对于InkWell小部件的onTap方法,不应使用<代码>打印(索引)将为您提供数组的索引<代码>打印(索引+1)将为您提供数组的可计数索引。数组的索引在Dart中以0开头
而且,print(konuListesi[index])
将为您提供所选项目:
onTap: () {
print("Number of the Position or direkt Item");
print(index);
print(konuListesi[index]);
}),
打印(索引);索引在打印(索引)上定义;索引是在上面定义的