File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ import 'store.dart';
11
11
12
12
/// The portion of [PerAccountStore] describing the users in the realm.
13
13
mixin UserStore on PerAccountStoreBase , RealmStore {
14
+ @protected
15
+ RealmStore get realmStore;
16
+
14
17
/// The user with the given ID, if that user is known.
15
18
///
16
19
/// There may be other users that are perfectly real but are
@@ -203,6 +206,17 @@ mixin ProxyUserStore on UserStore {
203
206
UserStatus getUserStatus (int userId) => userStore.getUserStatus (userId);
204
207
}
205
208
209
+ /// A base class for [PerAccountStore] substores that need access to [UserStore]
210
+ /// as well as to its prerequisites [CorePerAccountStore] and [RealmStore] .
211
+ abstract class HasUserStore extends HasRealmStore with UserStore , ProxyUserStore {
212
+ HasUserStore ({required UserStore users})
213
+ : userStore = users, super (realm: users.realmStore);
214
+
215
+ @protected
216
+ @override
217
+ final UserStore userStore;
218
+ }
219
+
206
220
/// The implementation of [UserStore] that does the work.
207
221
///
208
222
/// Generally the only code that should need this class is [PerAccountStore]
You can’t perform that action at this time.
0 commit comments