通过替换Flutter Redux中的嵌套对象来更新状态

时间:2019-04-17 13:03:41

标签: redux flutter-redux

 I am new to flutter redux. How can I update the PersonState with the address entity that resides in the person entity in 
  

人->模型       人{           地址;       }

  State -> 

PersonState {

    Map<int, PersonEntity> map; 

}

Reducer -> 
  action.address = list of all the addresses that are returned from the api middleware
PersonState _setPersonLoaded(
    PersonState personState, LoadPersonsSuccess action) {
  return personState.rebuild(
    (p) => p
  // TO DO 
  1. How do I update the Address entity inside the person entity in the Person state 

  );
}

0 个答案:

没有答案