Skip to content

Commit a2fa946

Browse files
committed
store [nfc]: Expose PerAccountStoreBase.core to subclasses
1 parent 3098213 commit a2fa946

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/model/store.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -364,19 +364,19 @@ class CorePerAccountStore {
364364
/// A base class for [PerAccountStore] and its substores,
365365
/// with getters providing the items in [CorePerAccountStore].
366366
abstract class PerAccountStoreBase {
367-
PerAccountStoreBase({required CorePerAccountStore core})
368-
: _core = core;
367+
PerAccountStoreBase({required this.core});
369368

370-
final CorePerAccountStore _core;
369+
@protected
370+
final CorePerAccountStore core;
371371

372372
////////////////////////////////
373373
// Where data comes from in the first place.
374374

375-
GlobalStore get _globalStore => _core._globalStore;
375+
GlobalStore get _globalStore => core._globalStore;
376376

377-
ApiConnection get connection => _core.connection;
377+
ApiConnection get connection => core.connection;
378378

379-
String get queueId => _core.queueId;
379+
String get queueId => core.queueId;
380380

381381
////////////////////////////////
382382
// Data attached to the realm or the server.
@@ -398,7 +398,7 @@ abstract class PerAccountStoreBase {
398398
////////////////////////////////
399399
// Data attached to the self-account on the realm.
400400

401-
int get accountId => _core.accountId;
401+
int get accountId => core.accountId;
402402

403403
/// The [Account] this store belongs to.
404404
///
@@ -413,7 +413,7 @@ abstract class PerAccountStoreBase {
413413
/// This always equals the [Account.userId] on [account].
414414
///
415415
/// For the corresponding [User] object, see [UserStore.selfUser].
416-
int get selfUserId => _core.selfUserId;
416+
int get selfUserId => core.selfUserId;
417417
}
418418

419419
const _tryResolveUrl = tryResolveUrl;

0 commit comments

Comments
 (0)