File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,9 @@ class StateManagerWidget extends StatefulWidget {
23
23
24
24
class StateManagerWidgetState extends State <StateManagerWidget > {
25
25
void rebuild () {
26
- if (! mounted) return ;
27
- try {
28
- setState (() {});
29
- } catch (_) {
30
- WidgetsBinding .instance.addPostFrameCallback ((_) {
31
- setState (() {});
32
- });
33
- }
26
+ WidgetsBinding .instance.addPostFrameCallback ((_) {
27
+ if (mounted) setState (() {});
28
+ });
34
29
}
35
30
36
31
@override
Original file line number Diff line number Diff line change 1
1
name : shared_value
2
2
description : A straightforward way to manage global state in flutter apps.
3
- version : 0.3.0
3
+ version : 0.3.1
4
4
author :
Dev Aggarwal <[email protected] >
5
5
homepage : https://github.com/pycampers/flutter-global-state
6
6
You can’t perform that action at this time.
0 commit comments