Dart List Map modify Map specified value

  GetxController data definition:

  final titles = [

    {"title": "name1", "content": ""},

    {"title": "name2", "content": ""},

    {"title": "name3", "content": ""}

  ].obs;

To modify the specified data value, use the where method of List:

 titles.where((item) => item['title'] == 'name1').first['content'] =

       “newValue”;

Supongo que te gusta

Origin blog.csdn.net/zww986736788/article/details/132193549
Recomendado
Clasificación