Closed ghost closed 4 years ago
Found the culprit ! Working in late hours of the night really makes one overlook things, whoops ! The issue is the following:
AppState copy({bool working, Position currentPosition, List<String> savedUsernames,
bool nearVisitLocation, bool tripInProgress, Employee deliveryEmployee, Trip currentTrip,
bool websocketConnected, List<BranchPhone> branchPhones,}) => AppState(
// --
currentTrip: currentTrip ?? this.currentTrip, //<== This is the problem
);
I cant believe i overlooked this. Closing my issues, thank you regardless !
I got the following case happening in my application. Whenever the currentTrip property of my state mutates, i get the desired results, my widget is rebuilt to show new information. The way this variable mutates is through the following action:
The problem occurs whenever currentTrip mutates into a null value. My widget is not being rebuilt with new information. It seems to only be the case whenever it is null, if a new trip is fetched from the server with different information, my widget is rebuilt as desired. Is there anything that I am overlooking? Thank you dearly in advance !
This is the class that contains current state of my app
The following is the connector widget