废话不多说 直接上代码 官方的写法

list tabs=[{},{},{}];

tabs.asMap().keys.map((item)=>Container(
       child:Text("${'索引值'+item}"),
)).toList()

 

Flutter map遍历获取List的索引值

要获取某一项只能tabs[索引] 来获取 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
  • 2021-04-20
  • 2021-06-30
  • 2021-07-30
猜你喜欢
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2021-08-06
  • 2021-09-23
相关资源
相似解决方案