v2.2.1
google_vision
允许您将 Google Visions 图像标记、人脸、徽标和地标检测、OCR 以及敏感内容检测功能添加到跨平台应用程序中。
46喜欢 306近 30 天下载160Pub 分数
AndroidiOSWebmacOSWindowsLinux
将 Google Vision 功能(包括图像标记、人脸、徽标和地标检测、光学字符识别 (OCR) 以及成人内容检测)集成到应用程序中。
以下为英文项目原文快照,最新内容请访问 GitHub。
Melos-managed Dart/Flutter monorepo for the Google Vision API.
| Package | Description | Pub |
|---|---|---|
| google_vision | Core Dart REST client for image annotation, OCR, and document analysis | |
| google_vision_cli | CLI tool for running Vision API requests from the terminal | |
| google_vision_flutter | Flutter widget wrapping the core library |
import 'package:google_vision/google_vision.dart';
final googleVision = await GoogleVision.withApiKey('YOUR_API_KEY');
final response = await googleVision.image.labelDetection(
jsonImage: JsonImage.fromPath('path/to/image.jpg'),
);
# Install via Homebrew
brew tap cdavis-code/google-vision
brew install vision
# Run landmark detection
vision detect --image-file photo.jpg --features LANDMARK_DETECTION
GoogleVisionFlutter(
apiKey: 'YOUR_API_KEY',
imagePath: 'assets/photo.jpg',
features: [FeatureType.labelDetection],
)
The core library supports three auth strategies:
| Method | Use Case |
|---|---|
withApiKey(key) |
Quick start, development |
withJwt(credentialsJson) |
Service accounts, production |
withGenerator(generator) |
Custom token refresh logic |
This project uses Melos for monorepo management.
| Action | Command |
|---|---|
| Get dependencies | melos run dep |
| Analyze | melos run analyze |
| Format | melos run format |
| Build (codegen) | melos run build |
| Generate docs | melos run doc |
| Pana score check | melos run pana |
| Publish prep | melos run prep |
GitHub Actions workflows run on every push:
MIT
依赖清单 1 项
^7.8.1先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗