Skip to content

Commit

Permalink
chore(release)
Browse files Browse the repository at this point in the history
  • Loading branch information
faithoflifedev committed Aug 14, 2024
1 parent 413e61c commit 3d540fb
Show file tree
Hide file tree
Showing 26 changed files with 112 additions and 141 deletions.
1 change: 0 additions & 1 deletion packages/google_vision_flutter/.pubignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

example/
screenshot/
tool/
6 changes: 6 additions & 0 deletions packages/google_vision_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.2.1+2

* added back the google_vision re-export
* package example is now included
* dependency bump for google_vision

## 1.1.0

* removed reexport of "google_vision" package
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 @@ -27,7 +27,7 @@ To use this package, add the dependency to your `pubspec.yaml` file:
```yaml
dependencies:
...
google_vision_flutter: ^1.1.0
google_vision_flutter: ^1.2.1+2
```
Expand Down
12 changes: 6 additions & 6 deletions packages/google_vision_flutter/example/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "7482962148e8d758338d8a28f589f317e1e42ba4"
revision: "b0850beeb25f6d5b10426284f506557f66181b36"
channel: "stable"

project_type: app
Expand All @@ -13,11 +13,11 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
- platform: android
create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
create_revision: b0850beeb25f6d5b10426284f506557f66181b36
base_revision: b0850beeb25f6d5b10426284f506557f66181b36
- platform: web
create_revision: b0850beeb25f6d5b10426284f506557f66181b36
base_revision: b0850beeb25f6d5b10426284f506557f66181b36

# User provided section

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
3 changes: 1 addition & 2 deletions packages/google_vision_flutter/example/lib/crop_hints.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:google_vision/google_vision.dart' as gv;
import 'package:google_vision_flutter/google_vision_flutter.dart';

class CropHints extends StatefulWidget {
Expand Down Expand Up @@ -53,7 +52,7 @@ class _MyHomePageState extends State<CropHints> {
imageProvider: _processImage.image,
builder: (
BuildContext context,
gv.CropHintsAnnotation? cropHintsAnnotation,
CropHintsAnnotation? cropHintsAnnotation,
ImageDetail? imageDetail,
) =>
Padding(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:google_vision/google_vision.dart' as gv;
import 'package:google_vision_flutter/google_vision_flutter.dart';

class DocumentTextDetection extends StatefulWidget {
Expand Down Expand Up @@ -53,7 +52,7 @@ class _MyHomePageState extends State<DocumentTextDetection> {
imageProvider: _processImage.image,
builder: (
BuildContext context,
gv.FullTextAnnotation? fullTextAnnotation,
FullTextAnnotation? fullTextAnnotation,
ImageDetail? imageDetail,
) =>
Padding(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:google_vision/google_vision.dart' as gv;
import 'package:google_vision_flutter/google_vision_flutter.dart';

class FaceDetection extends StatefulWidget {
Expand Down Expand Up @@ -52,7 +51,7 @@ class _MyHomePageState extends State<FaceDetection> {
'assets/service_credentials.json'),
imageProvider: _processImage.image,
builder: (BuildContext context,
List<gv.FaceAnnotation>? faceAnnotations,
List<FaceAnnotation>? faceAnnotations,
ImageDetail imageDetail) =>
CustomPaint(
foregroundPainter: AnnotationPainter(
Expand All @@ -71,7 +70,7 @@ class _MyHomePageState extends State<FaceDetection> {
}

class AnnotationPainter extends CustomPainter {
final List<gv.FaceAnnotation>? faceAnnotations;
final List<FaceAnnotation>? faceAnnotations;
// a reference to the original image
final ImageDetail imageDetail;

Expand Down Expand Up @@ -141,7 +140,7 @@ class AnnotationPainter extends CustomPainter {
}

void drawAnnotationsRect({
required List<gv.Vertex> vertices,
required List<Vertex> vertices,
required Canvas canvas,
required double heightRatio,
required double widthRatio,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:google_vision/google_vision.dart' as gv;
import 'package:google_vision_flutter/google_vision_flutter.dart';

class ImageProperties extends StatefulWidget {
Expand All @@ -12,8 +11,10 @@ class ImageProperties extends StatefulWidget {
}

class _MyHomePageState extends State<ImageProperties> {
static const assetName = 'assets/google_logo.jpg';

final _processImage = Image.asset(
'assets/logo.png',
assetName,
fit: BoxFit.fitWidth,
);

Expand All @@ -33,7 +34,7 @@ class _MyHomePageState extends State<ImageProperties> {
children: <Widget>[
const Padding(
padding: EdgeInsets.all(8.0),
child: Text('assets/logo.png'),
child: Text(assetName),
),
Padding(
padding: const EdgeInsets.all(8.0),
Expand All @@ -54,7 +55,7 @@ class _MyHomePageState extends State<ImageProperties> {
imageProvider: _processImage.image,
builder: (
BuildContext context,
gv.ImagePropertiesAnnotation? imagePropertiesAnnotation,
ImagePropertiesAnnotation? imagePropertiesAnnotation,
ImageDetail? imageDetail,
) =>
Padding(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:google_vision/google_vision.dart' as gv;
import 'package:google_vision_flutter/google_vision_flutter.dart';

class LabelDetection extends StatefulWidget {
Expand Down Expand Up @@ -53,7 +52,7 @@ class _MyHomePageState extends State<LabelDetection> {
imageProvider: _processImage.image,
builder: (
BuildContext context,
List<gv.EntityAnnotation>? entityAnnotations,
List<EntityAnnotation>? entityAnnotations,
ImageDetail? imageDetail,
) =>
Padding(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:google_vision/google_vision.dart' as gv;
import 'package:google_vision_flutter/google_vision_flutter.dart';

class LandmarkDetection extends StatefulWidget {
Expand Down Expand Up @@ -52,7 +51,7 @@ class _MyHomePageState extends State<LandmarkDetection> {
'assets/service_credentials.json'),
imageProvider: _processImage.image,
builder: (BuildContext context,
List<gv.EntityAnnotation>? entityAnnotations,
List<EntityAnnotation>? entityAnnotations,
ImageDetail imageDetail) =>
Padding(
padding: const EdgeInsets.all(8.0),
Expand Down
30 changes: 15 additions & 15 deletions packages/google_vision_flutter/example/lib/logo_detection.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:google_vision/google_vision.dart' as gv;
import 'package:google_vision_flutter/google_vision_flutter.dart';

class LogoDetection extends StatefulWidget {
Expand All @@ -12,8 +11,10 @@ class LogoDetection extends StatefulWidget {
}

class _MyHomePageState extends State<LogoDetection> {
static const assetName = 'assets/google_logo.jpg';

final _processImage = Image.asset(
'assets/logo.png',
assetName,
fit: BoxFit.fitWidth,
);

Expand All @@ -33,7 +34,7 @@ class _MyHomePageState extends State<LogoDetection> {
children: <Widget>[
const Padding(
padding: EdgeInsets.all(8.0),
child: Text('assets/logo.png'),
child: Text(assetName),
),
Padding(
padding: const EdgeInsets.all(8.0),
Expand All @@ -52,16 +53,15 @@ class _MyHomePageState extends State<LogoDetection> {
'assets/service_credentials.json'),
imageProvider: _processImage.image,
builder: (BuildContext context,
List<gv.EntityAnnotation>? entityAnnotations,
ImageDetail imageDetail) {
return CustomPaint(
foregroundPainter: EntityAnnotationPainter(
entityAnnotations: entityAnnotations,
imageDetail: imageDetail,
),
child: Image(image: _processImage.image),
);
},
List<EntityAnnotation>? entityAnnotations,
ImageDetail imageDetail) =>
CustomPaint(
foregroundPainter: EntityAnnotationPainter(
entityAnnotations: entityAnnotations,
imageDetail: imageDetail,
),
child: Image(image: _processImage.image),
),
),
)
],
Expand All @@ -72,7 +72,7 @@ class _MyHomePageState extends State<LogoDetection> {
}

class EntityAnnotationPainter extends CustomPainter {
final List<gv.EntityAnnotation>? entityAnnotations;
final List<EntityAnnotation>? entityAnnotations;
// a reference to the original image
final ImageDetail imageDetail;

Expand Down Expand Up @@ -142,7 +142,7 @@ class EntityAnnotationPainter extends CustomPainter {
}

void drawAnnotationsRect({
required List<gv.Vertex> vertices,
required List<Vertex> vertices,
required Canvas canvas,
required double heightRatio,
required double widthRatio,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:google_vision/google_vision.dart' as gv;
import 'package:google_vision_flutter/google_vision_flutter.dart';

class MultipleDetections extends StatefulWidget {
Expand Down Expand Up @@ -59,20 +58,20 @@ class _MyHomePageState extends State<MultipleDetections> {
'assets/service_credentials.json'),
imageProvider: _processImage.image,
features: [
gv.Feature(
Feature(
maxResults: 10,
type: gv.AnnotationType
type: AnnotationType
.faceDetection, // 'LOGO_DETECTION', // 'FACE_DETECTION'
),
gv.Feature(
Feature(
maxResults: 10,
type: gv.AnnotationType
type: AnnotationType
.objectLocalization, // 'LOGO_DETECTION', // 'FACE_DETECTION'
),
],
builder: (
BuildContext context,
AsyncSnapshot<gv.AnnotatedResponses> snapshot,
AsyncSnapshot<AnnotatedResponses> snapshot,
ImageDetail? imageDetail,
) {
if (snapshot.hasError) {
Expand Down Expand Up @@ -101,7 +100,7 @@ class _MyHomePageState extends State<MultipleDetections> {
}

class AnnotationPainter extends CustomPainter {
final gv.AnnotatedResponses annotatedResponses;
final AnnotatedResponses annotatedResponses;

// a reference to the original image
final ImageDetail imageDetail;
Expand Down Expand Up @@ -234,7 +233,7 @@ class AnnotationPainter extends CustomPainter {
}

void drawAnnotationsRect({
required List<gv.Vertex> vertices,
required List<Vertex> vertices,
required Canvas canvas,
required double heightRatio,
required double widthRatio,
Expand Down Expand Up @@ -265,7 +264,7 @@ class AnnotationPainter extends CustomPainter {
}

void drawAnnotationsNormalized({
required List<gv.NormalizedVertex> vertices,
required List<NormalizedVertex> vertices,
required Canvas canvas,
required Size size,
Color? color,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:google_vision/google_vision.dart' as gv;
import 'package:google_vision_flutter/google_vision_flutter.dart';

class ObjectLocalization extends StatefulWidget {
Expand Down Expand Up @@ -52,7 +51,7 @@ class _MyHomePageState extends State<ObjectLocalization> {
'assets/service_credentials.json'),
imageProvider: _processImage.image,
builder: (BuildContext context,
List<gv.LocalizedObjectAnnotation>?
List<LocalizedObjectAnnotation>?
localizedObjectAnnotations,
ImageDetail imageDetail) {
return CustomPaint(
Expand All @@ -74,7 +73,7 @@ class _MyHomePageState extends State<ObjectLocalization> {
}

class AnnotationPainter extends CustomPainter {
final List<gv.LocalizedObjectAnnotation>? localizedObjectAnnotations;
final List<LocalizedObjectAnnotation>? localizedObjectAnnotations;
// a reference to the original image
final ImageDetail imageDetail;

Expand Down Expand Up @@ -130,7 +129,7 @@ class AnnotationPainter extends CustomPainter {
}

void drawAnnotationsNormalized({
required List<gv.NormalizedVertex> vertices,
required List<NormalizedVertex> vertices,
required Canvas canvas,
required Size size,
Color? color,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:google_vision/google_vision.dart' as gv;
import 'package:google_vision_flutter/google_vision_flutter.dart';

class SafeSearchDetection extends StatefulWidget {
Expand Down Expand Up @@ -53,7 +52,7 @@ class _MyHomePageState extends State<SafeSearchDetection> {
imageProvider: _processImage.image,
builder: (
BuildContext context,
gv.SafeSearchAnnotation? safeSearchAnnotation,
SafeSearchAnnotation? safeSearchAnnotation,
ImageDetail? imageDetail,
) =>
Text('Result: ${safeSearchAnnotation!}')))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:google_vision/google_vision.dart' as gv;
import 'package:google_vision_flutter/google_vision_flutter.dart';

class TextDetection extends StatefulWidget {
Expand Down Expand Up @@ -52,7 +51,7 @@ class _MyHomePageState extends State<TextDetection> {
'assets/service_credentials.json'),
imageProvider: _processImage.image,
builder: (BuildContext context,
List<gv.EntityAnnotation>? entityAnnotations,
List<EntityAnnotation>? entityAnnotations,
ImageDetail imageDetail) {
return CustomPaint(
foregroundPainter: AnnotationPainter(
Expand All @@ -72,7 +71,7 @@ class _MyHomePageState extends State<TextDetection> {
}

class AnnotationPainter extends CustomPainter {
final List<gv.EntityAnnotation>? entityAnnotations;
final List<EntityAnnotation>? entityAnnotations;
// a reference to the original image
final ImageDetail imageDetail;

Expand Down
6 changes: 4 additions & 2 deletions packages/google_vision_flutter/example/lib/web_detection.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:flutter/material.dart';
import 'package:google_vision/google_vision.dart' as gv;
import 'package:google_vision_flutter/google_vision_flutter.dart';
import 'package:google_vision_flutter/google_vision_flutter.dart' as gv
show WebDetection;
import 'package:google_vision_flutter/google_vision_flutter.dart'
hide WebDetection;

class WebDetection extends StatefulWidget {
const WebDetection({super.key, required this.title});
Expand Down
Loading

0 comments on commit 3d540fb

Please sign in to comment.