Flutter 如何在Flatter redux中更新列表的属性

Flutter 如何在Flatter redux中更新列表的属性,flutter,dart,rxdart,flutter-redux,Flutter,Dart,Rxdart,Flutter Redux,我试图更新颤振redux中的一些属性,但我得到了以下错误 Class 'DivMatches' has no instance setter 'id='. 这是我的国家班 class AppState { var demoState; List myMatches; AppState({this.demoState, this.myMatches}); AppState copywith({demoState, myMatches}){ return AppState(

我试图更新颤振redux中的一些属性,但我得到了以下错误

Class 'DivMatches' has no instance setter 'id='.
这是我的国家班

class AppState {
  var demoState;
  List myMatches;

  AppState({this.demoState, this.myMatches});

  AppState copywith({demoState, myMatches}){
  return AppState(
     myMatches : myMatches ?? this.myMatches,
     demoState: demoState ?? this.demoState,
  );

 }
}
我的行为是这样的

class UpdateDivResult{ // update the div result by id
  dynamic id;
  UpdateDivResult(this.id);
 }
   var newMatch = state.myMatches[0][0];
    newMatch.id = 223;

    return state.copywith(
       myMatches: newMatch
    );
我的减速机看起来像这样

class UpdateDivResult{ // update the div result by id
  dynamic id;
  UpdateDivResult(this.id);
 }
   var newMatch = state.myMatches[0][0];
    newMatch.id = 223;

    return state.copywith(
       myMatches: newMatch
    );

请帮忙。非常感谢。

问题是,我用json序列化了变量final。删除final将允许您进行更新