removed old implementation
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
# Files and directories created by pub.
|
||||
.dart_tool/
|
||||
.packages
|
||||
|
||||
# Conventional directory for build output.
|
||||
build/
|
||||
@@ -1,3 +0,0 @@
|
||||
## 1.0.0
|
||||
|
||||
- Initial version.
|
||||
@@ -1 +0,0 @@
|
||||
A simple command-line application.
|
||||
@@ -1,30 +0,0 @@
|
||||
# This file configures the static analysis results for your project (errors,
|
||||
# warnings, and lints).
|
||||
#
|
||||
# This enables the 'recommended' set of lints from `package:lints`.
|
||||
# This set helps identify many issues that may lead to problems when running
|
||||
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
|
||||
# style and format.
|
||||
#
|
||||
# If you want a smaller set of lints you can change this to specify
|
||||
# 'package:lints/core.yaml'. These are just the most critical lints
|
||||
# (the recommended set includes the core lints).
|
||||
# The core lints are also what is used by pub.dev for scoring packages.
|
||||
|
||||
include: package:lints/recommended.yaml
|
||||
|
||||
# Uncomment the following section to specify additional rules.
|
||||
|
||||
# linter:
|
||||
# rules:
|
||||
# - camel_case_types
|
||||
|
||||
# analyzer:
|
||||
# exclude:
|
||||
# - path/to/excluded/files/**
|
||||
|
||||
# For more information about the core and recommended set of lints, see
|
||||
# https://dart.dev/go/core-lints
|
||||
|
||||
# For additional information about configuring this file, see
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
@@ -1,57 +0,0 @@
|
||||
import 'package:fl_query/fl_query.dart';
|
||||
|
||||
var todos = [
|
||||
{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false},
|
||||
{
|
||||
"userId": 1,
|
||||
"id": 2,
|
||||
"title": "quis ut nam facilis et officia qui",
|
||||
"completed": false
|
||||
},
|
||||
{"userId": 1, "id": 3, "title": "fugiat veniam minus", "completed": false},
|
||||
{"userId": 1, "id": 4, "title": "et porro tempora", "completed": true},
|
||||
{
|
||||
"userId": 1,
|
||||
"id": 5,
|
||||
"title": "laboriosam mollitia et enim quasi adipisci quia provident illum",
|
||||
"completed": false
|
||||
},
|
||||
{
|
||||
"userId": 1,
|
||||
"id": 6,
|
||||
"title": "qui ullam ratione quibusdam voluptatem quia omnis",
|
||||
"completed": false
|
||||
},
|
||||
];
|
||||
|
||||
void main() async {
|
||||
try {
|
||||
var key = QueryKey("TEST");
|
||||
QueryClient queryClient = QueryClient();
|
||||
queryClient.mount();
|
||||
var data = await queryClient
|
||||
.fetchQuery<Map<String, dynamic>, dynamic, Map<String, dynamic>>(
|
||||
queryKey: key,
|
||||
queryFn: (context) {
|
||||
return Future.value(todos.first);
|
||||
},
|
||||
);
|
||||
print("======FETCHED DATA======");
|
||||
print(data);
|
||||
print("======CACHED DATA======");
|
||||
print(queryClient.getQueryData(key));
|
||||
queryClient.setQueryData<Map<String, dynamic>>(key, (prevData) {
|
||||
return {
|
||||
...(prevData) ?? {},
|
||||
"title": "Yehi aloh heh",
|
||||
"completed": true,
|
||||
};
|
||||
});
|
||||
print("======CACHED DATA======");
|
||||
print(queryClient.getQueryData(key));
|
||||
print("======STATE======");
|
||||
print(queryClient.getQueryState(key)?.toJson());
|
||||
} catch (e) {
|
||||
print(e);
|
||||
}
|
||||
}
|
||||
@@ -1,124 +0,0 @@
|
||||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.8.2"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: charcode
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.15.0"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: crypto
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
fl_query:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "0.0.1"
|
||||
hive:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: hive
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.5"
|
||||
http:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.13.4"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.0.0"
|
||||
internet_connection_checker:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: internet_connection_checker
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.0.1+3"
|
||||
lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: lints
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.7.0"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.8.1"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.8.2"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
uuid:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: uuid
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.5"
|
||||
sdks:
|
||||
dart: ">=2.15.1 <3.0.0"
|
||||
@@ -1,16 +0,0 @@
|
||||
name: example
|
||||
description: A simple command-line application.
|
||||
version: 1.0.0
|
||||
# homepage: https://www.example.com
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
sdk: '>=2.15.1 <3.0.0'
|
||||
|
||||
|
||||
dependencies:
|
||||
fl_query:
|
||||
path: ../
|
||||
|
||||
dev_dependencies:
|
||||
lints: ^1.0.0
|
||||
Reference in New Issue
Block a user