-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: unit tests and updated pubspec description
- Loading branch information
1 parent
8fe3885
commit c48969e
Showing
15 changed files
with
378 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/sanity/flutter_sanity_portable_text/example/pubspec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# https://dart.dev/guides/libraries/private-files | ||
# Created by `dart pub` | ||
.dart_tool/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Example for using the Sanity Client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import 'package:sanity_client/sanity_client.dart'; | ||
|
||
Future<void> main() async { | ||
// using the SanityClient | ||
var client = SanityClient( | ||
SanityConfig( | ||
projectId: 'your_project_id', | ||
dataset: 'your_dataset', | ||
token: 'your_token', | ||
perspective: Perspective.published, | ||
explainQuery: true, | ||
useCdn: true, | ||
apiVersion: 'v2024-02-16', | ||
), | ||
); | ||
|
||
// make a query | ||
var query = ''' | ||
*[_type == "movie"]{ | ||
_id, | ||
title, | ||
releaseDate, | ||
"director": crewMembers[job == "Director"][0].person->name | ||
} | ||
'''; | ||
|
||
final response = await client.fetch(query); | ||
print(response); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
# Generated by pub | ||
# See https://dart.dev/tools/pub/glossary#lockfile | ||
packages: | ||
async: | ||
dependency: transitive | ||
description: | ||
name: async | ||
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" | ||
url: "https://pub.dev" | ||
source: hosted | ||
version: "2.11.0" | ||
characters: | ||
dependency: transitive | ||
description: | ||
name: characters | ||
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" | ||
url: "https://pub.dev" | ||
source: hosted | ||
version: "1.3.0" | ||
collection: | ||
dependency: transitive | ||
description: | ||
name: collection | ||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a | ||
url: "https://pub.dev" | ||
source: hosted | ||
version: "1.18.0" | ||
flutter: | ||
dependency: transitive | ||
description: flutter | ||
source: sdk | ||
version: "0.0.0" | ||
http: | ||
dependency: transitive | ||
description: | ||
name: http | ||
sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" | ||
url: "https://pub.dev" | ||
source: hosted | ||
version: "1.2.1" | ||
http_parser: | ||
dependency: transitive | ||
description: | ||
name: http_parser | ||
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" | ||
url: "https://pub.dev" | ||
source: hosted | ||
version: "4.0.2" | ||
json_annotation: | ||
dependency: transitive | ||
description: | ||
name: json_annotation | ||
sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 | ||
url: "https://pub.dev" | ||
source: hosted | ||
version: "4.8.1" | ||
lints: | ||
dependency: "direct dev" | ||
description: | ||
name: lints | ||
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 | ||
url: "https://pub.dev" | ||
source: hosted | ||
version: "3.0.0" | ||
material_color_utilities: | ||
dependency: transitive | ||
description: | ||
name: material_color_utilities | ||
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" | ||
url: "https://pub.dev" | ||
source: hosted | ||
version: "0.8.0" | ||
meta: | ||
dependency: transitive | ||
description: | ||
name: meta | ||
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 | ||
url: "https://pub.dev" | ||
source: hosted | ||
version: "1.11.0" | ||
path: | ||
dependency: transitive | ||
description: | ||
name: path | ||
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" | ||
url: "https://pub.dev" | ||
source: hosted | ||
version: "1.9.0" | ||
sanity_client: | ||
dependency: "direct main" | ||
description: | ||
path: ".." | ||
relative: true | ||
source: path | ||
version: "1.0.0-beta.5" | ||
sky_engine: | ||
dependency: transitive | ||
description: flutter | ||
source: sdk | ||
version: "0.0.99" | ||
source_span: | ||
dependency: transitive | ||
description: | ||
name: source_span | ||
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" | ||
url: "https://pub.dev" | ||
source: hosted | ||
version: "1.10.0" | ||
string_scanner: | ||
dependency: transitive | ||
description: | ||
name: string_scanner | ||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" | ||
url: "https://pub.dev" | ||
source: hosted | ||
version: "1.2.0" | ||
term_glyph: | ||
dependency: transitive | ||
description: | ||
name: term_glyph | ||
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 | ||
url: "https://pub.dev" | ||
source: hosted | ||
version: "1.2.1" | ||
typed_data: | ||
dependency: transitive | ||
description: | ||
name: typed_data | ||
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c | ||
url: "https://pub.dev" | ||
source: hosted | ||
version: "1.3.2" | ||
vector_math: | ||
dependency: transitive | ||
description: | ||
name: vector_math | ||
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" | ||
url: "https://pub.dev" | ||
source: hosted | ||
version: "2.1.4" | ||
web: | ||
dependency: transitive | ||
description: | ||
name: web | ||
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" | ||
url: "https://pub.dev" | ||
source: hosted | ||
version: "0.5.1" | ||
sdks: | ||
dart: ">=3.3.3 <4.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: sanity_client_example | ||
description: An example for using the sanity_client package | ||
version: 1.0.0 | ||
# repository: https://github.com/my_org/my_repo | ||
|
||
environment: | ||
sdk: ^3.3.3 | ||
|
||
# Add regular dependencies here. | ||
dependencies: | ||
sanity_client: ^1.0.0-beta.1 | ||
|
||
dev_dependencies: | ||
lints: ^3.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.