开发者

Flutter: How to implement a list returned by Future and show the subtotal after refresh?

开发者 https://www.devze.com 2022-12-07 18:14 出处:网络
What\'s the best way to implement the following scenario using the stacked package? I have a list of items with price. This list is returned from a future. I also have a datepicker. By changing the da

What's the best way to implement the following scenario using the stacked package? I have a list of items with price. This list is returned from a future. I also have a datepicker. By changing the date, the list is refreshed with new data. Every time the list gets refreshed, I want to show the subtotal value in the app bar of the page. I tried to wrap the page in the FutureViewModel class and it works to refresh the list. But I am not sure how to update the subtotal. 开发者_如何学JAVAShould subtotal have a separate modelview? I think the subtotal should be calculated where the list of items exists. I am not sure how to implement this.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号