Skip to content

Commit

Permalink
example logging and issue #28
Browse files Browse the repository at this point in the history
  • Loading branch information
faithoflifedev committed Dec 11, 2024
1 parent f1490c8 commit 2cb7ead
Show file tree
Hide file tree
Showing 9 changed files with 3,524 additions and 63 deletions.
1 change: 0 additions & 1 deletion packages/google_vision_flutter/.pubignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

screenshot/
tool/
11 changes: 10 additions & 1 deletion packages/google_vision_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Changelog

## 2.0.0+3
## 2.0.0+5

* add additional headers to concrete impl of google vision #28
* add logging to the example app

## 2.0.0+4

* dependency bump

## 2.0.0+3

* readme changes

## 2.0.0+2

* dependency bump
Expand Down
45 changes: 18 additions & 27 deletions packages/google_vision_flutter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,22 @@ Native [Dart](https://dart.dev/) package that integrates Google Vision features,

Please feel free to submit PRs for any additional helper methods, or report an [issue](https://github.com/faithoflifedev/google_vision/issues) for a missing helper method and I'll add it if I have time available.

## Table of Contents
- [Google Vision Images Flutter Widget](#google-vision-images-flutter-widget)
- [Table of Contents](#table-of-contents)
- [Recent Changes](#recent-changes)
- [New for v2.0.0](#new-for-v200)
- [New for v1.4.0](#new-for-v140)
- [Getting Started](#getting-started)
- [pubspec.yaml](#pubspecyaml)
- [Obtaining Authorization Credentials](#obtaining-authorization-credentials)
- [Usage of the GoogleVisionBuilder Widget](#usage-of-the-googlevisionbuilder-widget)
- [ShoutOut](#shoutout)
- [Contributing](#contributing)

[![GitHub License](https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
[![Pub Package](https://img.shields.io/pub/v/google_vision_flutter.svg?logo=dart&logoColor=00b9fc&color=blue&style=for-the-badge)](https://pub.dartlang.org/packages/google_vision_flutter)
[![Code Size](https://img.shields.io/github/languages/code-size/faithoflifedev/google_vision_workspace?logo=github&logoColor=white&style=for-the-badge)](https://github.com/faithoflifedev/google_vision_workspace)
[![Publisher](https://img.shields.io/pub/publisher/google_vision_flutter?style=for-the-badge)](https://pub.dev/publishers/muayid.com)

[![Build Status](https://img.shields.io/github/actions/workflow/status/faithoflifedev/google_vision_workspace/flutter.yaml?branch=main&logo=github-actions&logoColor=white&style=for-the-badge)](https://github.com/faithoflifedev/google_vision_workspace/actions)
[![Pull Requests](https://img.shields.io/github/issues-pr/faithoflifedev/google_vision_workspace?logo=github&logoColor=white&style=for-the-badge)](https://github.com/faithoflifedev/flutter_image_converter/pulls)
[![Issues](https://img.shields.io/github/issues/faithoflifedev/google_vision_workspace?logo=github&logoColor=white&style=for-the-badge)](https://github.com/faithoflifedev/google_vision_workspace/issues)
[![github last commit](https://shields.io/github/last-commit/faithoflifedev/google_vision?logo=github&logoColor=white&style=for-the-badge)](https://shields.io/github/last-commit/faithoflifedev/google_vision)
[![popularity](https://img.shields.io/pub/popularity/google_vision_flutter?style=for-the-badge&logo=dart)](https://pub.dev/packages/google_vision_flutter/score)
[![Pub Score](https://img.shields.io/pub/points/google_vision_flutter?logo=dart&logoColor=00b9fc&style=for-the-badge)](https://pub.dev/packages/google_vision_flutter/score)
[![likes](https://img.shields.io/pub/likes/google_vision_flutter?style=for-the-badge&logo=dart)](https://pub.dev/packages/google_vision_flutter/score)


## Table of Contents
- [Recent Changes](#recent-changes)
- [New for v2.0.0](#new-for-v200)
- [New for v1.4.0](#new-for-v140)
- [Getting Started](#getting-started)
- [pubspec.yaml](#pubspecyaml)
- [Obtaining Authorization Credentials](#obtaining-authorization-credentials)
- [Usage of the GoogleVisionBuilder Widget](#usage-of-the-googlevisionbuilder-widget)
- [Contributors](#contributors)
- [Contributing](#contributing)

[![Buy me a coffee](https://www.buymeacoffee.com/assets/img/guidelines/download-assets-1.svg)](https://www.buymeacoffee.com/faithoflif2)

## Recent Changes

Expand All @@ -42,7 +32,8 @@ Please feel free to submit PRs for any additional helper methods, or report an [
- The deprecated methods from in v1.3.x have been removed in this version.
- Logging functionality has been added to the package
```dart
final googleVision = await GoogleVision(LogLevel.all).withJwtFile('service_credentials.json');
final googleVision =
GoogleVision(LogLevel.all).withAsset('assets/service_credentials.json');
```

### New for v1.4.0
Expand All @@ -65,7 +56,7 @@ To use this package, add the dependency to your `pubspec.yaml` file:
```yaml
dependencies:
...
google_vision_flutter: ^2.0.0+3
google_vision_flutter: ^2.0.0+5
```
Expand Down Expand Up @@ -134,9 +125,9 @@ class LabelDetectionPage extends ExampleBase {

<center><img src="https://github.com/faithoflifedev/google_vision_workspace/blob/main/packages/google_vision_flutter/screenshot/face_detection.png?raw=true&amp;v1" width="320"></center>

## ShoutOut
## Contributors

- To [Andrii Syrokomskyi](https://github.com/signmotion) for creating [flutter_image_converter](https://github.com/signmotion/flutter_image_converter), I've borrowed some of the code included in the `flutter_image_converter` in this package. This package originally had a dependency on `flutter_image_converter`, but that had to be removed to achieve `web` platform support.
- [hieupm2096](https://github.com/hieupm2096)

## Contributing

Expand Down
3 changes: 2 additions & 1 deletion packages/google_vision_flutter/example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:google_vision_flutter/google_vision_flutter.dart'
hide WebDetection;
import 'package:loggy/loggy.dart';

import 'crop_hints_page.dart';
import 'document_text_detection_page.dart';
Expand All @@ -25,7 +26,7 @@ void main() {

class MyApp extends StatelessWidget {
final googleVision =
GoogleVision().withAsset('assets/service_credentials.json');
GoogleVision(LogLevel.off).withAsset('assets/service_credentials.json');

MyApp({super.key});

Expand Down
5 changes: 3 additions & 2 deletions packages/google_vision_flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ description: A simple app to test the google_vision_flutter package

publish_to: none

version: 1.0.0+2
version: 1.0.0+3

environment:
sdk: ">=3.2.0 <4.0.0"

dependencies:
color: ^3.0.0
google_vision_flutter: ^2.0.0
google_vision_flutter: ^2.0.0+2
# google_vision_flutter:
# path: ../
loggy: ^2.0.3
syncfusion_flutter_pdfviewer: ^27.1.50

flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/google_vision_flutter/lib/meta.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ library;
import 'dart:convert' show json;

final pubSpec = json.decode(
'{"name":"google_vision_flutter","version":"2.0.0+3","homepage":"https://github.com/faithoflifedev/google_vision/tree/main/packages/google_vision_flutter","environment":{"sdk":">=3.2.0 <4.0.0","flutter":">=3.16.0"},"description":"Add Google Visions image labeling, face, logo, and landmark detection into your Flutter applications.","dependencies":{"dio":"^5.7.0","flutter_image_converter":"^0.4.1","google_vision":"^2.0.0","image":"^4.2.0","loggy":"^2.0.3","flutter":{"sdk":"flutter"}},"dev_dependencies":{"flutter_lints":"^5.0.0","grinder":"^0.9.5","publish_tools":"^1.0.0+5"},"repository":"https://github.com/faithoflifedev/google_vision","topics":["api","widget","flutter","image","document"],"funding":["https://www.buymeacoffee.com/faithoflif2"]}');
'{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+5}');
11 changes: 7 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+3
version: 2.0.0+5
repository: https://github.com/faithoflifedev/google_vision
homepage: https://github.com/faithoflifedev/google_vision/tree/main/packages/google_vision_flutter

Expand All @@ -23,10 +23,10 @@ environment:
dependencies:
dio: ^5.7.0
flutter_image_converter: ^0.4.1
google_vision: ^2.0.0
google_vision: ^2.0.0+3
# google_vision:
# path: ../google_vision
image: ^4.2.0
image: ^4.3.0
loggy: ^2.0.3

flutter:
Expand All @@ -35,4 +35,7 @@ dependencies:
dev_dependencies:
flutter_lints: ^5.0.0
grinder: ^0.9.5
publish_tools: ^1.0.0+5
publish_tools: ^1.0.0+10

dependency_overrides:
collection: ^1.18.0
Loading

0 comments on commit 2cb7ead

Please sign in to comment.