小编Ken*_*nyP的帖子

How to maintain Flutter Global BloC state using Provider on Hot Reload?

I seem to lose application state whenever I perform a hot reload.

I am using a BloC provider to store application state. This is passed at the App level in the main.dart and consumed on a child page. On the initial load of the view, the value is shown. I can navigate around the application and the state persists. However, when I perform a hot reload, I lose the values and seemingly the state.

How can I fix this issue …

dart flutter bloc

5
推荐指数
1
解决办法
787
查看次数

标签 统计

bloc ×1

dart ×1

flutter ×1