-
Notifications
You must be signed in to change notification settings - Fork 863
feat: GenAI packages #840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
feat: GenAI packages #840
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds first-class support for Google ML Kit GenAI APIs (Summarization, Proofreading, Rewriting, Image Description, Speech Recognition, and Prompt) to the Flutter plugin suite, wires them into the umbrella google_ml_kit package, updates the example app, and standardizes licensing metadata.
Changes:
- Introduces new GenAI Flutter plugins (Android + iOS shims) for summarization, proofreading, rewriting, image description, speech recognition, and generic prompt-based generation, plus corresponding documentation and wiring in scripts.
- Updates the umbrella
google_ml_kitpackage, root README, and example app to advertise and reference the new GenAI features. - Standardizes LICENSE headers across the repository to attribute copyright to
flutter-ml.dev(2026).
Reviewed changes
Copilot reviewed 110 out of 122 changed files in this pull request and generated 26 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/update_libs.sh | Adjusts dependency update script to include new GenAI packages and stop deleting Podfile.lock, affecting how pod updates and failures are handled. |
| scripts/publish.sh | Extends the publish script to run flutter pub publish --dry-run for each new GenAI package before publishing the umbrella plugin. |
| packages/google_mlkit_translation/LICENSE | Updates translation plugin license copyright holder/year. |
| packages/google_mlkit_text_recognition/LICENSE | Updates text recognition plugin license metadata. |
| packages/google_mlkit_subject_segmentation/LICENSE | Updates subject segmentation plugin license metadata. |
| packages/google_mlkit_smart_reply/LICENSE | Updates smart reply plugin license metadata. |
| packages/google_mlkit_selfie_segmentation/LICENSE | Updates selfie segmentation plugin license metadata. |
| packages/google_mlkit_pose_detection/LICENSE | Updates pose detection plugin license metadata. |
| packages/google_mlkit_object_detection/LICENSE | Updates object detection plugin license metadata. |
| packages/google_mlkit_language_id/LICENSE | Updates language ID plugin license metadata. |
| packages/google_mlkit_image_labeling/LICENSE | Updates image labeling plugin license metadata. |
| packages/google_mlkit_genai_summarization/pubspec.yaml | Defines the google_mlkit_genai_summarization Flutter plugin (env constraints, dependencies, and plugin registration for Android/iOS). |
| packages/google_mlkit_genai_summarization/lib/src/summarizer.dart | Implements the Dart-side Summarizer API (enums, configuration, feature download, streaming/non-streaming inference, and GenAiException) over a method channel. |
| packages/google_mlkit_genai_summarization/lib/google_mlkit_genai_summarization.dart | Exposes the GenAI summarization Dart API and re-exports commons utilities. |
| packages/google_mlkit_genai_summarization/ios/google_mlkit_genai_summarization.podspec | Adds CocoaPods spec for the summarization plugin, sourcing metadata from pubspec.yaml. |
| packages/google_mlkit_genai_summarization/ios/Classes/GoogleMlKitGenaiSummarizationPlugin.m | Adds iOS plugin stub for summarization that reports all methods as UNIMPLEMENTED (Android-only API) while handling close. |
| packages/google_mlkit_genai_summarization/ios/Classes/GoogleMlKitGenaiSummarizationPlugin.h | Declares the iOS summarization plugin interface. |
| packages/google_mlkit_genai_summarization/ios/Assets/.gitkeep | Keeps the iOS Assets directory tracked for the summarization plugin. |
| packages/google_mlkit_genai_summarization/ios/.gitignore | Adds standard iOS/Xcode ignore rules for the summarization plugin. |
| packages/google_mlkit_genai_summarization/example/README.md | Points to the shared example app for the summarization package. |
| packages/google_mlkit_genai_summarization/android/src/main/java/com/google_mlkit_genai_summarization/Summarizer.java | Implements Android-side Summarizer method-call handler using ML Kit’s GenAI Summarization APIs and Guava futures. |
| packages/google_mlkit_genai_summarization/android/src/main/java/com/google_mlkit_genai_summarization/GoogleMlKitGenaiSummarizationPlugin.java | Wires the Android summarization plugin into the Flutter engine and delegates to the Summarizer handler. |
| packages/google_mlkit_genai_summarization/android/src/main/AndroidManifest.xml | Declares the Android package name for the summarization plugin. |
| packages/google_mlkit_genai_summarization/android/settings.gradle | Sets the Gradle root project name for the summarization Android module. |
| packages/google_mlkit_genai_summarization/android/build.gradle | Configures the Android library module for summarization, including compileSdk, minSdk, and ML Kit GenAI summarization and Guava dependencies. |
| packages/google_mlkit_genai_summarization/android/.gitignore | Adds Android/Gradle-related ignore rules for the summarization plugin. |
| packages/google_mlkit_genai_summarization/analysis_options.yaml | Reuses the main google_ml_kit analysis options for the summarization package. |
| packages/google_mlkit_genai_summarization/README.md | Documents the GenAI Summarization Flutter plugin, including usage, requirements, and caveats (Android-only). |
| packages/google_mlkit_genai_summarization/LICENSE | Adds an MIT License for the summarization package under flutter-ml.dev. |
| packages/google_mlkit_genai_summarization/.gitignore | Adds standard Flutter/Dart ignore rules for the summarization package. |
| packages/google_mlkit_genai_speech_recognition/pubspec.yaml | Defines the google_mlkit_genai_speech_recognition plugin (env constraints, dependencies, and platform registration). |
| packages/google_mlkit_genai_speech_recognition/pubspec.lock | Locks dependency versions for the GenAI speech recognition package. |
| packages/google_mlkit_genai_speech_recognition/ios/google_mlkit_genai_speech_recognition.podspec | Adds CocoaPods spec for the GenAI speech recognition plugin. |
| packages/google_mlkit_genai_speech_recognition/ios/Classes/GoogleMlKitGenaiSpeechRecognitionPlugin.m | Adds an iOS stub plugin for GenAI speech recognition that reports all methods as UNIMPLEMENTED and handles close. |
| packages/google_mlkit_genai_speech_recognition/ios/Classes/GoogleMlKitGenaiSpeechRecognitionPlugin.h | Declares the iOS speech recognition plugin interface. |
| packages/google_mlkit_genai_speech_recognition/ios/Assets/.gitkeep | Keeps the iOS Assets folder for the speech recognition plugin. |
| packages/google_mlkit_genai_speech_recognition/ios/.gitignore | Adds standard iOS ignore rules for the speech recognition plugin. |
| packages/google_mlkit_genai_speech_recognition/android/src/main/java/com/google_mlkit_genai_speech_recognition/SpeechRecognizer.java | Implements the Android-side speech recognition handler, using reflection and Guava futures to call ML Kit’s GenAI speech recognition API. |
| packages/google_mlkit_genai_speech_recognition/android/src/main/java/com/google_mlkit_genai_speech_recognition/GoogleMlKitGenaiSpeechRecognitionPlugin.java | Registers the Android speech recognition plugin and delegates to SpeechRecognizer. |
| packages/google_mlkit_genai_speech_recognition/android/src/main/AndroidManifest.xml | Declares the Android package name for the speech recognition plugin. |
| packages/google_mlkit_genai_speech_recognition/android/settings.gradle | Sets the Gradle root project name for the speech recognition module. |
| packages/google_mlkit_genai_speech_recognition/android/build.gradle | Configures the Android library module and adds GenAI speech recognition and Guava dependencies. |
| packages/google_mlkit_genai_speech_recognition/android/.gitignore | Adds Android/Gradle ignore rules for this plugin module. |
| packages/google_mlkit_genai_speech_recognition/LICENSE | Adds an MIT license file for the speech recognition plugin. |
| packages/google_mlkit_genai_speech_recognition/.gitignore | Adds Dart/Flutter ignore rules at the package root. |
| packages/google_mlkit_genai_rewriting/pubspec.yaml | Defines the google_mlkit_genai_rewriting plugin with its environment, dependencies, and platform registration. |
| packages/google_mlkit_genai_rewriting/pubspec.lock | Locks dependency versions for the GenAI rewriting package. |
| packages/google_mlkit_genai_rewriting/ios/google_mlkit_genai_rewriting.podspec | Adds CocoaPods spec for the rewriting plugin. |
| packages/google_mlkit_genai_rewriting/ios/Classes/GoogleMlKitGenaiRewritingPlugin.m | Adds an iOS stub for GenAI rewriting that marks all methods as UNIMPLEMENTED and supports close. |
| packages/google_mlkit_genai_rewriting/ios/Classes/GoogleMlKitGenaiRewritingPlugin.h | Declares the iOS rewriting plugin interface. |
| packages/google_mlkit_genai_rewriting/ios/Assets/.gitkeep | Keeps the iOS Assets folder for the rewriting plugin. |
| packages/google_mlkit_genai_rewriting/ios/.gitignore | Adds iOS-specific ignore rules for the rewriting plugin. |
| packages/google_mlkit_genai_rewriting/android/src/main/java/com/google_mlkit_genai_rewriting/Rewriter.java | Implements Android-side GenAI rewriting handler around ML Kit’s Rewriting APIs using Guava futures. |
| packages/google_mlkit_genai_rewriting/android/src/main/java/com/google_mlkit_genai_rewriting/GoogleMlKitGenaiRewritingPlugin.java | Registers the Android rewriting plugin with Flutter. |
| packages/google_mlkit_genai_rewriting/android/src/main/AndroidManifest.xml | Declares the Android package name for the rewriting plugin. |
| packages/google_mlkit_genai_rewriting/android/settings.gradle | Sets the Gradle project name for the rewriting plugin. |
| packages/google_mlkit_genai_rewriting/android/build.gradle | Configures the Android library and adds GenAI rewriting plus Guava dependencies. |
| packages/google_mlkit_genai_rewriting/android/.gitignore | Adds Android/Gradle ignore rules for the rewriting plugin. |
| packages/google_mlkit_genai_rewriting/LICENSE | Adds an MIT license for the rewriting plugin. |
| packages/google_mlkit_genai_rewriting/.gitignore | Adds Dart/Flutter ignore rules at the rewriting package root. |
| packages/google_mlkit_genai_proofreading/pubspec.yaml | Defines the google_mlkit_genai_proofreading plugin with environment, dependencies, and platform registration. |
| packages/google_mlkit_genai_proofreading/lib/src/proofreader.dart | Implements the Dart-side Proofreader API, including input enums, feature status, result type, method-channel methods, and exception class. |
| packages/google_mlkit_genai_proofreading/lib/google_mlkit_genai_proofreading.dart | Exports the proofreading Dart API and commons utilities. |
| packages/google_mlkit_genai_proofreading/ios/google_mlkit_genai_proofreading.podspec | Adds CocoaPods spec for the proofreading plugin. |
| packages/google_mlkit_genai_proofreading/ios/Classes/GoogleMlKitGenaiProofreadingPlugin.m | Adds an iOS stub plugin declaring UNIMPLEMENTED GenAI proofreading methods and supporting close. |
| packages/google_mlkit_genai_proofreading/ios/Classes/GoogleMlKitGenaiProofreadingPlugin.h | Declares the iOS proofreading plugin interface. |
| packages/google_mlkit_genai_proofreading/ios/Assets/.gitkeep | Keeps the iOS Assets folder for the proofreading plugin. |
| packages/google_mlkit_genai_proofreading/ios/.gitignore | Adds iOS ignore rules for the proofreading plugin. |
| packages/google_mlkit_genai_proofreading/example/README.md | Points to the central example for the proofreading plugin. |
| packages/google_mlkit_genai_proofreading/android/src/main/java/com/google_mlkit_genai_proofreading/Proofreader.java | Implements Android-side GenAI proofreading handler using ML Kit’s Proofreading APIs and Guava futures. |
| packages/google_mlkit_genai_proofreading/android/src/main/java/com/google_mlkit_genai_proofreading/GoogleMlKitGenaiProofreadingPlugin.java | Registers the Android proofreading plugin with Flutter. |
| packages/google_mlkit_genai_proofreading/android/src/main/AndroidManifest.xml | Declares the Android package name for the proofreading plugin. |
| packages/google_mlkit_genai_proofreading/android/settings.gradle | Sets the Gradle project name for the proofreading plugin. |
| packages/google_mlkit_genai_proofreading/android/build.gradle | Configures the Android library module with GenAI proofreading and Guava dependencies. |
| packages/google_mlkit_genai_proofreading/android/.gitignore | Adds Android/Gradle ignore rules for the proofreading plugin. |
| packages/google_mlkit_genai_proofreading/analysis_options.yaml | Reuses google_ml_kit analysis options for the proofreading package. |
| packages/google_mlkit_genai_proofreading/README.md | Documents usage and requirements for the GenAI Proofreading plugin. |
| packages/google_mlkit_genai_proofreading/LICENSE | Adds an MIT license for the proofreading plugin. |
| packages/google_mlkit_genai_proofreading/.gitignore | Adds Flutter/Dart ignore rules at the proofreading package root. |
| packages/google_mlkit_genai_prompt/pubspec.yaml | Defines the google_mlkit_genai_prompt plugin with environment, dependencies, and platform registration. |
| packages/google_mlkit_genai_prompt/pubspec.lock | Locks dependency versions for the GenAI prompt package. |
| packages/google_mlkit_genai_prompt/ios/google_mlkit_genai_prompt.podspec | Adds CocoaPods spec for the prompt plugin. |
| packages/google_mlkit_genai_prompt/ios/Classes/GoogleMlKitGenaiPromptPlugin.m | Adds an iOS stub prompt plugin that reports methods as UNIMPLEMENTED and handles close. |
| packages/google_mlkit_genai_prompt/ios/Classes/GoogleMlKitGenaiPromptPlugin.h | Declares the iOS prompt plugin interface. |
| packages/google_mlkit_genai_prompt/ios/Assets/.gitkeep | Keeps the iOS Assets folder for the prompt plugin. |
| packages/google_mlkit_genai_prompt/ios/.gitignore | Adds iOS ignore rules for the prompt plugin. |
| packages/google_mlkit_genai_prompt/android/src/main/java/com/google_mlkit_genai_prompt/Prompt.java | Implements Android-side prompt handler using reflection and Guava futures to drive GenAI prompt APIs. |
| packages/google_mlkit_genai_prompt/android/src/main/java/com/google_mlkit_genai_prompt/GoogleMlKitGenaiPromptPlugin.java | Registers the Android prompt plugin with Flutter. |
| packages/google_mlkit_genai_prompt/android/src/main/AndroidManifest.xml | Declares the Android package name for the prompt plugin. |
| packages/google_mlkit_genai_prompt/android/settings.gradle | Sets the Gradle project name for the prompt plugin. |
| packages/google_mlkit_genai_prompt/android/build.gradle | Configures the Android library module and adds GenAI prompt, Guava, and concurrent-futures dependencies. |
| packages/google_mlkit_genai_prompt/android/.gitignore | Adds Android/Gradle ignore rules for the prompt plugin. |
| packages/google_mlkit_genai_prompt/LICENSE | Adds an MIT license for the prompt plugin. |
| packages/google_mlkit_genai_image_description/pubspec.yaml | Defines the google_mlkit_genai_image_description plugin with environment, dependencies, and platform registration. |
| packages/google_mlkit_genai_image_description/pubspec.lock | Locks dependency versions for the image description package. |
| packages/google_mlkit_genai_image_description/ios/google_mlkit_genai_image_description.podspec | Adds CocoaPods spec for the image description plugin. |
| packages/google_mlkit_genai_image_description/ios/Classes/GoogleMlKitGenaiImageDescriptionPlugin.m | Adds an iOS stub plugin for GenAI image description that responds UNIMPLEMENTED and supports close. |
| packages/google_mlkit_genai_image_description/ios/Classes/GoogleMlKitGenaiImageDescriptionPlugin.h | Declares the iOS image description plugin interface. |
| packages/google_mlkit_genai_image_description/ios/Assets/.gitkeep | Keeps the iOS Assets folder for the image description plugin. |
| packages/google_mlkit_genai_image_description/ios/.gitignore | Adds iOS ignore rules for the image description plugin. |
| packages/google_mlkit_genai_image_description/android/src/main/java/com/google_mlkit_genai_image_description/ImageDescriber.java | Implements Android-side GenAI image description handler including image decoding and ML Kit calls. |
| packages/google_mlkit_genai_image_description/android/src/main/java/com/google_mlkit_genai_image_description/GoogleMlKitGenaiImageDescriptionPlugin.java | Registers the Android image description plugin with Flutter. |
| packages/google_mlkit_genai_image_description/android/src/main/AndroidManifest.xml | Declares the Android package name for the image description plugin. |
| packages/google_mlkit_genai_image_description/android/settings.gradle | Sets the Gradle project name for the image description plugin. |
| packages/google_mlkit_genai_image_description/android/build.gradle | Configures the Android library and adds GenAI image description and Guava dependencies. |
| packages/google_mlkit_genai_image_description/android/.gitignore | Adds Android/Gradle ignore rules for the image description plugin. |
| packages/google_mlkit_genai_image_description/LICENSE | Adds an MIT license for the image description plugin. |
| packages/google_mlkit_face_mesh_detection/LICENSE | Updates face mesh detection plugin license metadata. |
| packages/google_mlkit_face_detection/LICENSE | Updates face detection plugin license metadata. |
| packages/google_mlkit_entity_extraction/LICENSE | Updates entity extraction plugin license metadata. |
| packages/google_mlkit_document_scanner/LICENSE | Updates document scanner plugin license metadata. |
| packages/google_mlkit_digital_ink_recognition/LICENSE | Updates digital ink recognition plugin license metadata. |
| packages/google_mlkit_commons/LICENSE | Updates commons package license metadata. |
| packages/google_mlkit_barcode_scanning/LICENSE | Updates barcode scanning plugin license metadata. |
| packages/google_ml_kit/pubspec.yaml | Adds dependencies on all new GenAI plugins to the umbrella google_ml_kit package. |
| packages/google_ml_kit/lib/google_ml_kit.dart | Re-exports the new GenAI plugin packages from the umbrella google_ml_kit library. |
| packages/google_ml_kit/README.md | Documents the new GenAI APIs in the google_ml_kit README with feature table and package links. |
| packages/google_ml_kit/LICENSE | Updates the umbrella package license metadata. |
| packages/example/pubspec.yaml | Adds path dependencies on the new GenAI plugins in the main example app. |
| packages/example/pubspec.lock | Locks example app dependencies including new GenAI packages. |
| packages/example/lib/main.dart | Extends the example app UI with a “GenAI APIs” section and placeholder views for each new GenAI feature (Android-only section). |
| packages/example/ios/Podfile.lock | Includes the new GenAI pods into the iOS example project dependency lockfile. |
| README.md | Updates the root README to document and link to all new GenAI plugins and their source. |
| LICENSE | Updates the root project license metadata to flutter-ml.dev (2026). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...enai_proofreading/android/src/main/java/com/google_mlkit_genai_proofreading/Proofreader.java
Show resolved
Hide resolved
...es/google_mlkit_genai_prompt/android/src/main/java/com/google_mlkit_genai_prompt/Prompt.java
Show resolved
Hide resolved
packages/google_mlkit_genai_summarization/lib/src/summarizer.dart
Outdated
Show resolved
Hide resolved
...nai_summarization/android/src/main/java/com/google_mlkit_genai_summarization/Summarizer.java
Show resolved
Hide resolved
...scription/android/src/main/java/com/google_mlkit_genai_image_description/ImageDescriber.java
Show resolved
Hide resolved
...scription/android/src/main/java/com/google_mlkit_genai_image_description/ImageDescriber.java
Show resolved
Hide resolved
...scription/android/src/main/java/com/google_mlkit_genai_image_description/ImageDescriber.java
Show resolved
Hide resolved
abd4879 to
7e73d1b
Compare
No description provided.