Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
522 views
in Technique[技术] by (71.8m points)

flutter - How to refresh a ListView with many stateful widgets in it?

I'm working on a flutter project and encounter a question. How can I refresh a listView with many stateful widgets in it, each stateful widget has its own state and can be assigned to new state when the parent listView get refreshed? I'm not looking for an answer like put all child states in parent widget and set state from parent widget, 'cause that will lose the point using listView. The only solution I can come up with is to use provider, but that may be a problem when some of the child widgets are shared between tabViews, with different index I can fetch different data from api, local state would perform best in my case...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...