Skip to content
pubscout

google_mlkit_commons

1.0.3, released 8 days ago by flutter-ml.dev

Common classes and utility methods for Google's ML Kit plugins

$ flutter pub add google_mlkit_commons
Source repository

What it does

Provides shared classes like InputImage and ModelManager that are used across Google's standalone ML Kit plugins. It handles image conversion from files, paths, bytes, and bitmaps, as well as remote model management.

AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a Flutter app using Google ML Kit plugins that require an InputImage
  • You need to manage downloadable remote ML models

Skip it when

  • You are targeting web or platforms other than Android and iOS
  • You are not using any Google ML Kit plugins

Strengths

  • Provides a unified InputImage abstraction for multiple ML Kit plugins
  • Simplifies camera stream integration and image format handling for Android and iOS

Weaknesses

  • Limited to mobile platforms (Android and iOS)
  • Relies on native platform channels with no processing done in Dart

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
0

Requires iOS deployment target 15.0 or newer, Swift Package Manager setup with specific linker flags, and Android SDK configurations.

import 'package:google_mlkit_commons/google_mlkit_commons.dart';

final inputImage = InputImage.fromFilePath(filePath);

Works with

Packages commonly used together with google_mlkit_commons: ones it builds on, ones built on it, and its own family.