From 73c6823c08b706482d28707a936f434dd825a763 Mon Sep 17 00:00:00 2001 From: Chris D Date: Sat, 9 Sep 2023 13:14:43 -0400 Subject: [PATCH] 'better `Flutter` support' --- CHANGELOG.md | 5 +++++ README.md | 33 ++++++++++++++++++--------------- lib/meta.dart | 2 +- tool/README.md | 24 ++++++++++++++---------- 4 files changed, 38 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d39a5c1..1eeed22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 1.1.0 + +* better `Flutter` support +* dependency bumps + ## 1.0.8+4 * fix for flutter example diff --git a/README.md b/README.md index 5968ee8..cb729e6 100644 --- a/README.md +++ b/README.md @@ -27,12 +27,23 @@ Please feel free to submit PRs for any additional helper methods, or report an [ ## Recent Changes -<<<<<<< HEAD +### New for v1.1.0 + - [HighLiuk](https://github.com/HighLiuk) has contributed code that fills out some of the overall functionality + - **Breaking Change:** The `GoogleVision` api has changed. To generate an auth token from a `String` the constructor `GoogleVision.withJwt(String credentialsJsonAsString)` should now be used, and for a file `GoogleVision.withJwtFile(String credentialsFilename)` + + ```dart + // In your Flutter app + final credentialsJsonAsString = + await rootBundle.loadString('assets/service_credentials.json'); + + final googleVision = await GoogleVision.withJwt(credentialsJsonAsString); + ``` + + This change reflects the fact that the more common use case of the package is with `Flutter` + ### New for v1.0.8 - web entities and pages detection [https://cloud.google.com/vision/docs/detecting-web](https://cloud.google.com/vision/docs/detecting-web), provides urls of web pages that match the specified image -======= ->>>>>>> fdaccb1 ('added support for more detection methods') ### New for v1.0.7 [JLuisRojas](https://github.com/JLuisRojas) has provided code for: @@ -49,10 +60,6 @@ In addition support for the following has also been added: [imhafeez](https://github.com/imhafeez) has provided code for `Safe Search` functionality. -### New for v1.0.3 - -[4ctobias](https://github.com/4ctobias) has provided code for `Label Detection` functionality. - ## Getting Started ### pubspec.yaml @@ -62,11 +69,7 @@ To use this package, add the dependency to your `pubspec.yaml` file: ```yaml dependencies: ... -<<<<<<< HEAD - google_vision: ^1.0.8+4 -======= - google_vision: ^1.0.7 ->>>>>>> fdaccb1 ('added support for more detection methods') + google_vision: ^1.1.0 ``` ### Obtaining Authorization Credentials @@ -192,11 +195,11 @@ Please see the cli documentation [README.md](https://github.com/faithoflifedev/g - [imhafeez](https://github.com/imhafeez) - [4ctobias](https://github.com/4ctobias) - [JLuisRojas](https://github.com/JLuisRojas) -<<<<<<< HEAD - [DeadBryam](https://github.com/DeadBryam) - [husitawi](https://github.com/husitawi) -======= ->>>>>>> fdaccb1 ('added support for more detection methods') +- [DeadBryam](https://github.com/DeadBryam) +- [husitawi](https://github.com/husitawi) +- [HighLiuk](https://github.com/HighLiuk) ## Contributing diff --git a/lib/meta.dart b/lib/meta.dart index 02dbf75..09a4f4b 100644 --- a/lib/meta.dart +++ b/lib/meta.dart @@ -3,4 +3,4 @@ import 'dart:convert' show json; final pubSpec = json.decode( - '{"name":"google_vision","version":"1.0.8+4","homepage":"https://github.com/faithoflifedev/google_vision","environment":{"sdk":">=2.17.0 <4.0.0"},"description":"Allows you to add Google Visions image labeling, face, logo, and landmark detection, OCR, and detection of explicit content, into applications.","dependencies":{"args":"^2.4.2","color":"^3.0.0","crypto_keys":"^0.3.0+1","dio":"^5.2.1+1","http":"^0.13.6","image":"^4.0.17","jose":"^0.3.3","json_annotation":"^4.8.1","retrofit":"^4.0.1","universal_io":"^2.2.2"},"dev_dependencies":{"build_runner":"^2.4.5","grinder":"^0.9.4","json_serializable":"^6.7.0","lints":"^2.1.1","publish_tools":"^0.1.0+10","retrofit_generator":"^7.0.7","test":"^1.24.3"},"executables":{"vision":""},"repository":"https://github.com/faithoflifedev/google_vision"}'); + '{"name":"google_vision","version":"1.1.0","homepage":"https://github.com/faithoflifedev/google_vision","environment":{"sdk":">=3.0.0 <4.0.0"},"description":"Allows you to add Google Visions image labeling, face, logo, and landmark detection, OCR, and detection of explicit content, into applications.","dependencies":{"args":"^2.4.2","color":"^3.0.0","crypto_keys":"^0.3.0+1","dio":"^5.3.2","http":"^1.1.0","image":"^4.0.17","jose":"^0.3.4","json_annotation":"^4.8.1","retrofit":"^4.0.1","universal_io":"^2.2.2"},"dev_dependencies":{"build_runner":"^2.4.6","grinder":"^0.9.4","json_serializable":"^6.7.1","lints":"^2.1.1","publish_tools":"^0.1.0+11","retrofit_generator":"^7.0.8","test":"^1.24.6"},"dependency_overrides":{"x509":{"git":"https://github.com/faithoflifedev/x509.git"}},"executables":{"vision":""},"repository":"https://github.com/faithoflifedev/google_vision"}'); diff --git a/tool/README.md b/tool/README.md index 55a7b83..d11d584 100644 --- a/tool/README.md +++ b/tool/README.md @@ -12,10 +12,7 @@ Please feel free to submit PRs for any additional helper methods, or report an [ ## Table of Contents - [Recent Changes](#recent-changes) -<<<<<<< HEAD - [New for v1.0.8](#new-for-v108) -======= ->>>>>>> fdaccb1 ('added support for more detection methods') - [New for v1.0.7](#new-for-v107) - [New for v1.0.6](#new-for-v106) - [New for v1.0.3](#new-for-v103) @@ -30,12 +27,23 @@ Please feel free to submit PRs for any additional helper methods, or report an [ ## Recent Changes -<<<<<<< HEAD +### New for v1.1.0 + - [HighLiuk](https://github.com/HighLiuk) has contributed code that fills out some of the overall functionality + - **Breaking Change:** The `GoogleVision` api has changed. To generate an auth token from a `String` the constructor `GoogleVision.withJwt(String credentialsJsonAsString)` should now be used, and for a file `GoogleVision.withJwtFile(String credentialsFilename)` + + ```dart + // In your Flutter app + final credentialsJsonAsString = + await rootBundle.loadString('assets/service_credentials.json'); + + final googleVision = await GoogleVision.withJwt(credentialsJsonAsString); + ``` + + This change reflects the fact that the more common use case of the package is with `Flutter` + ### New for v1.0.8 - web entities and pages detection [https://cloud.google.com/vision/docs/detecting-web](https://cloud.google.com/vision/docs/detecting-web), provides urls of web pages that match the specified image -======= ->>>>>>> fdaccb1 ('added support for more detection methods') ### New for v1.0.7 [JLuisRojas](https://github.com/JLuisRojas) has provided code for: @@ -52,10 +60,6 @@ In addition support for the following has also been added: [imhafeez](https://github.com/imhafeez) has provided code for `Safe Search` functionality. -### New for v1.0.3 - -[4ctobias](https://github.com/4ctobias) has provided code for `Label Detection` functionality. - ## Getting Started ### pubspec.yaml