Skip to content

Commit 42e89c4

Browse files
fix(sdk): update dependency dart to >=3.7.0 <4.0.0 (#689)
* fix(sdk): update dependency dart to >=3.7.0 <4.0.0 * style: format files --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Joshua Tang <[email protected]>
1 parent 2f41c90 commit 42e89c4

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 2.16.0
55
homepage: https://github.com/zeshuaro/firestore_cache
66

77
environment:
8-
sdk: ">=3.6.2 <4.0.0"
8+
sdk: ">=3.7.0 <4.0.0"
99
flutter: ">=3.29.0"
1010

1111
dependencies:

test/firestore_cache_test.dart

+21-21
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ void main() {
7979
test('testGetFromCacheFallbackToServer', () async {
8080
final mockDocRef = MockDocumentReference<Map<String, dynamic>>();
8181

82-
when(() => mockDocRef.get(any())).thenThrow(
83-
FirebaseException(plugin: 'test'),
84-
);
82+
when(
83+
() => mockDocRef.get(any()),
84+
).thenThrow(FirebaseException(plugin: 'test'));
8585
when(() => mockDocRef.get()).thenAnswer((_) {
8686
return Future.value(mockSnapshot);
8787
});
@@ -175,9 +175,9 @@ void main() {
175175
cacheField: now.toIso8601String(),
176176
});
177177
final updatedAt = now.subtract(const Duration(seconds: 1));
178-
when(() => mockCacheSnapshot.data()).thenReturn({
179-
cacheField: Timestamp.fromDate(updatedAt),
180-
});
178+
when(
179+
() => mockCacheSnapshot.data(),
180+
).thenReturn({cacheField: Timestamp.fromDate(updatedAt)});
181181

182182
final snapshot = await FirestoreCache.getDocuments(
183183
query: mockQuery,
@@ -213,9 +213,9 @@ void main() {
213213
cacheField: now.toIso8601String(),
214214
});
215215
final updatedAt = now.subtract(const Duration(seconds: 1));
216-
when(() => mockCacheSnapshot.data()).thenReturn({
217-
cacheField: Timestamp.fromDate(updatedAt),
218-
});
216+
when(
217+
() => mockCacheSnapshot.data(),
218+
).thenReturn({cacheField: Timestamp.fromDate(updatedAt)});
219219

220220
final snapshot = await FirestoreCache.getDocuments(
221221
query: mockQuery,
@@ -253,9 +253,9 @@ void main() {
253253
cacheField: now.toIso8601String(),
254254
});
255255
final updatedAt = now.subtract(const Duration(seconds: 1));
256-
when(() => mockCacheSnapshot.data()).thenReturn({
257-
cacheField: Timestamp.fromDate(updatedAt),
258-
});
256+
when(
257+
() => mockCacheSnapshot.data(),
258+
).thenReturn({cacheField: Timestamp.fromDate(updatedAt)});
259259

260260
final result = await FirestoreCache.isFetchDocuments(
261261
mockCacheDocRef,
@@ -272,9 +272,9 @@ void main() {
272272
cacheField: now.toIso8601String(),
273273
});
274274
final updatedAt = now.add(const Duration(seconds: 1));
275-
when(() => mockCacheSnapshot.data()).thenReturn({
276-
cacheField: Timestamp.fromDate(updatedAt),
277-
});
275+
when(
276+
() => mockCacheSnapshot.data(),
277+
).thenReturn({cacheField: Timestamp.fromDate(updatedAt)});
278278

279279
final result = await FirestoreCache.isFetchDocuments(
280280
mockCacheDocRef,
@@ -291,9 +291,9 @@ void main() {
291291
cacheField: now.toIso8601String(),
292292
});
293293
final updatedAt = now.add(const Duration(seconds: 1));
294-
when(() => mockCacheSnapshot.data()).thenReturn({
295-
cacheField: updatedAt.toIso8601String(),
296-
});
294+
when(
295+
() => mockCacheSnapshot.data(),
296+
).thenReturn({cacheField: updatedAt.toIso8601String()});
297297

298298
final result = await FirestoreCache.isFetchDocuments(
299299
mockCacheDocRef,
@@ -345,9 +345,9 @@ void main() {
345345
SharedPreferences.setMockInitialValues({
346346
cacheField: now.toIso8601String(),
347347
});
348-
when(() => mockCacheSnapshot.data()).thenReturn({
349-
cacheField: 'invalidDateFormat',
350-
});
348+
when(
349+
() => mockCacheSnapshot.data(),
350+
).thenReturn({cacheField: 'invalidDateFormat'});
351351

352352
expect(
353353
() async => await FirestoreCache.isFetchDocuments(

0 commit comments

Comments
 (0)