@@ -38,8 +38,7 @@ class GlobalStoreWidget extends StatefulWidget {
38
38
/// * [PerAccountStoreWidget.of] , for the user's data associated with a
39
39
/// particular Zulip account.
40
40
static GlobalStore of (BuildContext context) {
41
- final widget = context
42
- .dependOnInheritedWidgetOfExactType <_GlobalStoreInheritedWidget >();
41
+ final widget = context.dependOnInheritedWidgetOfExactType <_GlobalStoreInheritedWidget >();
43
42
assert (widget != null , 'No GlobalStoreWidget ancestor' );
44
43
return widget! .store;
45
44
}
@@ -75,9 +74,10 @@ class _GlobalStoreWidgetState extends State<GlobalStoreWidget> {
75
74
// a [StatefulWidget] to get hold of the store, and an [InheritedWidget] to
76
75
// provide it to descendants, and one widget can't be both of those.
77
76
class _GlobalStoreInheritedWidget extends InheritedNotifier <GlobalStore > {
78
- const _GlobalStoreInheritedWidget (
79
- {required GlobalStore store, required super .child})
80
- : super (notifier: store);
77
+ const _GlobalStoreInheritedWidget ({
78
+ required GlobalStore store,
79
+ required super .child,
80
+ }) : super (notifier: store);
81
81
82
82
GlobalStore get store => notifier! ;
83
83
@@ -103,8 +103,11 @@ class _GlobalStoreInheritedWidget extends InheritedNotifier<GlobalStore> {
103
103
/// * [GlobalStoreWidget] , for the app's data beyond that of a
104
104
/// particular account.
105
105
class PerAccountStoreWidget extends StatefulWidget {
106
- const PerAccountStoreWidget (
107
- {super .key, required this .accountId, required this .child});
106
+ const PerAccountStoreWidget ({
107
+ super .key,
108
+ required this .accountId,
109
+ required this .child,
110
+ });
108
111
109
112
final int accountId;
110
113
final Widget child;
@@ -137,8 +140,7 @@ class PerAccountStoreWidget extends StatefulWidget {
137
140
/// particular account.
138
141
/// * [InheritedNotifier] , which provides the "dependency" mechanism.
139
142
static PerAccountStore of (BuildContext context) {
140
- final widget = context
141
- .dependOnInheritedWidgetOfExactType <_PerAccountStoreInheritedWidget >();
143
+ final widget = context.dependOnInheritedWidgetOfExactType <_PerAccountStoreInheritedWidget >();
142
144
assert (widget != null , 'No PerAccountStoreWidget ancestor' );
143
145
return widget! .store;
144
146
}
@@ -223,9 +225,10 @@ class _PerAccountStoreWidgetState extends State<PerAccountStoreWidget> {
223
225
// [StatefulWidget] to get hold of the store, and an [InheritedWidget] to
224
226
// provide it to descendants, and one widget can't be both of those.
225
227
class _PerAccountStoreInheritedWidget extends InheritedNotifier <PerAccountStore > {
226
- const _PerAccountStoreInheritedWidget (
227
- {required PerAccountStore store, required super .child})
228
- : super (notifier: store);
228
+ const _PerAccountStoreInheritedWidget ({
229
+ required PerAccountStore store,
230
+ required super .child,
231
+ }) : super (notifier: store);
229
232
230
233
PerAccountStore get store => notifier! ;
231
234
0 commit comments