Обновите состояние, заменив вложенный объект в Flutter redux - PullRequest
0 голосов
/ 17 апреля 2019
 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 

  );
}
...