File tree 4 files changed +8
-8
lines changed
4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ class Store {
130
130
131
131
/// Return an existing SyncClient associated with the store or null if not available.
132
132
/// See [Sync.client()] to create one first.
133
- SyncClient syncClient () => SyncClientsStorage [this ];
133
+ SyncClient syncClient () => syncClientsStorage [this ];
134
134
135
135
/// The low-level pointer to this store.
136
136
Pointer <Void > get ptr => _cStore;
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ class SyncClient {
99
99
void close () {
100
100
final err = bindings.obx_sync_close (_cSync);
101
101
_cSync = nullptr;
102
- SyncClientsStorage .remove (_store);
102
+ syncClientsStorage .remove (_store);
103
103
StoreCloseObserver .removeListener (_store, this );
104
104
syncOrObserversExclusive.unmark (_store);
105
105
checkObx (err);
@@ -233,12 +233,12 @@ class Sync {
233
233
/// Make sure the SyncClient is not destroyed and thus synchronization can keep running in the background.
234
234
static SyncClient client (
235
235
Store store, String serverUri, SyncCredentials creds) {
236
- if (SyncClientsStorage .containsKey (store)) {
236
+ if (syncClientsStorage .containsKey (store)) {
237
237
throw Exception ('Only one sync client can be active for a store' );
238
238
}
239
239
syncOrObserversExclusive.mark (store);
240
240
final client = SyncClient (store, serverUri, creds);
241
- SyncClientsStorage [store] = client;
241
+ syncClientsStorage [store] = client;
242
242
StoreCloseObserver .addListener (store, client, client.close);
243
243
return client;
244
244
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class StoreCloseObserver {
41
41
}
42
42
43
43
/// Global internal storage of sync clients - one client per store.
44
- final Map <Store , SyncClient > SyncClientsStorage = {};
44
+ final Map <Store , SyncClient > syncClientsStorage = {};
45
45
46
46
// Currently, either SyncClient or Observers can be used at the same time.
47
47
// TODO: lift this condition after #142 is fixed.
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ void main() {
41
41
test ('Model Entity has sync enabled' , () {
42
42
final model = getObjectBoxModel ().model;
43
43
final entity =
44
- model.entities.firstWhere ((ModelEntity e) => e.name == " TestEntity" );
44
+ model.entities.firstWhere ((ModelEntity e) => e.name == ' TestEntity' );
45
45
expect (entity.hasFlag (OBXEntityFlag .SYNC_ENABLED ), isTrue);
46
46
});
47
47
@@ -70,11 +70,11 @@ void main() {
70
70
final error = throwsA (predicate ((Exception e) => e.toString ().contains (
71
71
'Using observers/query streams in combination with SyncClient is currently not supported' )));
72
72
73
- SyncClient c = createClient (store);
73
+ createClient (store);
74
74
expect (() => env.box.query ().build ().findStream (), error);
75
75
});
76
76
});
77
-
77
+
78
78
test ('SyncClient lifecycle' , () {
79
79
expect (store.syncClient (), isNull);
80
80
You can’t perform that action at this time.
0 commit comments