Skip to content

Commit

Permalink
chore: remove unnecessary defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
D-James-GH committed Oct 21, 2024
1 parent be6da67 commit 394933f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions examples/full/lib/posts/post_service.dart
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import 'dart:convert';

import 'package:cached_query_flutter/cached_query_flutter.dart';
import 'package:http/http.dart' as http;
import 'package:full/posts/post_model/post_model.dart';
import 'package:http/http.dart' as http;

InfiniteQuery<List<PostModel>, int> getPosts() {
return InfiniteQuery<List<PostModel>, int>(
key: 'posts',
config: QueryConfigFlutter(
refetchOnResume: true,
storageDuration: const Duration(seconds: 10),
storeQuery: true,
refetchDuration: const Duration(seconds: 2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ void main() {
test("Can set refetch config per query", () async {
final query = MockQuery<String>();
when(query.config).thenReturn(
QueryConfigFlutter(
refetchOnResume: true,
refetchOnConnection: true,
),
QueryConfigFlutter(),
);
when(query.hasListener).thenReturn(true);
when(query.key).thenReturn("hasListeners");
Expand Down Expand Up @@ -132,7 +129,7 @@ void main() {
final q = Query<String>(
key: "global",
queryFn: () async => "",
config: QueryConfigFlutter(refetchOnResume: true),
config: QueryConfigFlutter(),
);
expect((q.config as QueryConfigFlutter).refetchOnResume, true);
});
Expand Down

0 comments on commit 394933f

Please sign in to comment.