Skip to content

Commit

Permalink
onError, onLoading are discarded #27
Browse files Browse the repository at this point in the history
  • Loading branch information
faithoflifedev committed Feb 24, 2025
1 parent 58cb7b8 commit e093034
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 31 deletions.
4 changes: 4 additions & 0 deletions packages/google_vision_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.0.0+7

* onError, onLoading are discarded #27

## 2.0.0+6

* logo
Expand Down
2 changes: 1 addition & 1 deletion packages/google_vision_flutter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ To use this package, add the dependency to your `pubspec.yaml` file:
```yaml
dependencies:
...
google_vision_flutter: ^2.0.0+6
google_vision_flutter: ^2.0.0+7
```
Expand Down
4 changes: 1 addition & 3 deletions packages/google_vision_flutter/lib/meta.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/// app metadata
library;

// DO NOT EDIT THIS FILE
// THIS FILE IS AUTOMATICALLY OVER WRITTEN BY PublishTools
import 'dart:convert' show json;

final pubSpec = json.decode(
'{description: Add Google Visions image labeling, face, logo, and landmark detection into your Flutter applications., homepage: https://github.com/faithoflifedev/google_vision/tree/main/packages/google_vision_flutter, documentation: null, repository: https://github.com/faithoflifedev/google_vision, issueTracker: null, name: google_vision_flutter, publish_to: null, version: 2.0.0+6}');
final pubSpec = json.decode('{description: Add Google Visions image labeling, face, logo, and landmark detection into your Flutter applications., homepage: https://github.com/faithoflifedev/google_vision/tree/main/packages/google_vision_flutter, documentation: null, repository: https://github.com/faithoflifedev/google_vision, issueTracker: null, name: google_vision_flutter, publish_to: null, version: 2.0.0+7}');
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ class GoogleVisionFileBuilder extends GoogleVisionBuilderBase {
inputConfig: inputConfig,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.cropHints, maxResults),
AnnotationType.cropHints,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionFileBuilder] for document text detections.
Expand Down Expand Up @@ -80,7 +84,11 @@ class GoogleVisionFileBuilder extends GoogleVisionBuilderBase {
inputConfig: inputConfig,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.documentTextDetection, maxResults),
AnnotationType.documentTextDetection,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionFileBuilder] for face detections.
Expand Down Expand Up @@ -108,7 +116,11 @@ class GoogleVisionFileBuilder extends GoogleVisionBuilderBase {
inputConfig: inputConfig,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.faceDetection, maxResults),
AnnotationType.faceDetection,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionFileBuilder] for image properties detection.
Expand Down Expand Up @@ -136,7 +148,11 @@ class GoogleVisionFileBuilder extends GoogleVisionBuilderBase {
inputConfig: inputConfig,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.imageProperties, maxResults),
AnnotationType.imageProperties,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionFileBuilder] for label detections.
Expand Down Expand Up @@ -164,7 +180,11 @@ class GoogleVisionFileBuilder extends GoogleVisionBuilderBase {
inputConfig: inputConfig,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.labelDetection, maxResults),
AnnotationType.labelDetection,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionFileBuilder] for landmark detections.
Expand Down Expand Up @@ -192,7 +212,11 @@ class GoogleVisionFileBuilder extends GoogleVisionBuilderBase {
inputConfig: inputConfig,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.landmarkDetection, maxResults),
AnnotationType.landmarkDetection,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionFileBuilder] for logo detections.
Expand Down Expand Up @@ -220,7 +244,11 @@ class GoogleVisionFileBuilder extends GoogleVisionBuilderBase {
inputConfig: inputConfig,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.logoDetection, maxResults),
AnnotationType.logoDetection,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionFileBuilder] for object localization detections.
Expand Down Expand Up @@ -248,7 +276,11 @@ class GoogleVisionFileBuilder extends GoogleVisionBuilderBase {
inputConfig: inputConfig,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.objectLocalization, maxResults),
AnnotationType.objectLocalization,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionFileBuilder] for product search detections.
Expand Down Expand Up @@ -276,7 +308,11 @@ class GoogleVisionFileBuilder extends GoogleVisionBuilderBase {
inputConfig: inputConfig,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.productSearch, maxResults),
AnnotationType.productSearch,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionFileBuilder] for safe search detections.
Expand Down Expand Up @@ -304,7 +340,11 @@ class GoogleVisionFileBuilder extends GoogleVisionBuilderBase {
inputConfig: inputConfig,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.safeSearchDetection, maxResults),
AnnotationType.safeSearchDetection,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionFileBuilder] for text detections.
Expand Down Expand Up @@ -335,6 +375,8 @@ class GoogleVisionFileBuilder extends GoogleVisionBuilderBase {
AnnotationType.textDetection,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionFileBuilder] for web detections.
Expand Down Expand Up @@ -362,7 +404,11 @@ class GoogleVisionFileBuilder extends GoogleVisionBuilderBase {
inputConfig: inputConfig,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.webDetection, maxResults),
AnnotationType.webDetection,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

Future<BatchAnnotateFilesResponse> _batchAnnotateFilesResponse() async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ class GoogleVisionImageBuilder extends GoogleVisionBuilderBase {
imageProvider: imageProvider,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.cropHints, maxResults),
AnnotationType.cropHints,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionImageBuilder] for document text detections.
Expand Down Expand Up @@ -80,7 +84,11 @@ class GoogleVisionImageBuilder extends GoogleVisionBuilderBase {
imageProvider: imageProvider,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.documentTextDetection, maxResults),
AnnotationType.documentTextDetection,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionImageBuilder] for face detections.
Expand Down Expand Up @@ -108,7 +116,11 @@ class GoogleVisionImageBuilder extends GoogleVisionBuilderBase {
imageProvider: imageProvider,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.faceDetection, maxResults),
AnnotationType.faceDetection,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionImageBuilder] for image properties detection.
Expand Down Expand Up @@ -136,7 +148,11 @@ class GoogleVisionImageBuilder extends GoogleVisionBuilderBase {
imageProvider: imageProvider,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.imageProperties, maxResults),
AnnotationType.imageProperties,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionImageBuilder] for label detections.
Expand Down Expand Up @@ -164,7 +180,11 @@ class GoogleVisionImageBuilder extends GoogleVisionBuilderBase {
imageProvider: imageProvider,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.labelDetection, maxResults),
AnnotationType.labelDetection,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionImageBuilder] for landmark detections.
Expand Down Expand Up @@ -192,7 +212,11 @@ class GoogleVisionImageBuilder extends GoogleVisionBuilderBase {
imageProvider: imageProvider,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.landmarkDetection, maxResults),
AnnotationType.landmarkDetection,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionImageBuilder] for logo detections.
Expand Down Expand Up @@ -220,7 +244,11 @@ class GoogleVisionImageBuilder extends GoogleVisionBuilderBase {
imageProvider: imageProvider,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.logoDetection, maxResults),
AnnotationType.logoDetection,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionImageBuilder] for object localization detections.
Expand Down Expand Up @@ -248,7 +276,11 @@ class GoogleVisionImageBuilder extends GoogleVisionBuilderBase {
imageProvider: imageProvider,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.objectLocalization, maxResults),
AnnotationType.objectLocalization,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionImageBuilder] for product search detections.
Expand Down Expand Up @@ -276,7 +308,11 @@ class GoogleVisionImageBuilder extends GoogleVisionBuilderBase {
imageProvider: imageProvider,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.productSearch, maxResults),
AnnotationType.productSearch,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionImageBuilder] for safe search detections.
Expand Down Expand Up @@ -304,7 +340,11 @@ class GoogleVisionImageBuilder extends GoogleVisionBuilderBase {
imageProvider: imageProvider,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.safeSearchDetection, maxResults),
AnnotationType.safeSearchDetection,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionImageBuilder] for text detections.
Expand Down Expand Up @@ -332,7 +372,11 @@ class GoogleVisionImageBuilder extends GoogleVisionBuilderBase {
imageProvider: imageProvider,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.textDetection, maxResults),
AnnotationType.textDetection,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

/// Creates a new instance of [GoogleVisionImageBuilder] for web detections.
Expand Down Expand Up @@ -360,7 +404,11 @@ class GoogleVisionImageBuilder extends GoogleVisionBuilderBase {
imageProvider: imageProvider,
googleVision: googleVision,
features: GoogleVisionBuilderBase.getFeatures(
AnnotationType.webDetection, maxResults),
AnnotationType.webDetection,
maxResults,
),
onError: onError,
onLoading: onLoading,
);

Future<BatchAnnotateImagesResponse> _batchAnnotateImagesResponse() async {
Expand Down
8 changes: 4 additions & 4 deletions packages/google_vision_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: google_vision_flutter
description: Add Google Visions image labeling, face, logo, and landmark detection into your Flutter applications.
version: 2.0.0+6
version: 2.0.0+7
repository: https://github.com/faithoflifedev/google_vision
homepage: https://github.com/faithoflifedev/google_vision/tree/main/packages/google_vision_flutter

Expand All @@ -21,12 +21,12 @@ environment:
flutter: ">=3.16.0"

dependencies:
dio: ^5.7.0
dio: ^5.8.0+1
flutter_image_converter: ^0.4.1
google_vision: ^2.0.0+4
google_vision: ^2.0.0+5
# google_vision:
# path: ../google_vision
image: ^4.3.0
image: ^4.5.3
loggy: ^2.0.3

flutter:
Expand Down

0 comments on commit e093034

Please sign in to comment.