Skip to content

Commit abd4879

Browse files
committed
feat: GenAI packages
1 parent 9644d0a commit abd4879

141 files changed

Lines changed: 5088 additions & 22 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ Packages with changes:
1919
- [`google_mlkit_entity_extraction` - `v0.15.3`](#google_mlkit_entity_extraction---v0153)
2020
- [`google_mlkit_face_detection` - `v0.13.2`](#google_mlkit_face_detection---v0132)
2121
- [`google_mlkit_face_mesh_detection` - `v0.4.2`](#google_mlkit_face_mesh_detection---v042)
22+
- [`google_mlkit_genai_image_description` - `v0.1.0`](#google_mlkit_genai_image_description---v010)
23+
- [`google_mlkit_genai_proofreading` - `v0.1.0`](#google_mlkit_genai_proofreading---v010)
24+
- [`google_mlkit_genai_prompt` - `v0.1.0`](#google_mlkit_genai_prompt---v010)
25+
- [`google_mlkit_genai_rewriting` - `v0.1.0`](#google_mlkit_genai_rewriting---v010)
26+
- [`google_mlkit_genai_speech_recognition` - `v0.1.0`](#google_mlkit_genai_speech_recognition---v010)
27+
- [`google_mlkit_genai_summarization` - `v0.1.0`](#google_mlkit_genai_summarization---v010)
2228
- [`google_mlkit_image_labeling` - `v0.14.2`](#google_mlkit_image_labeling---v0142)
2329
- [`google_mlkit_language_id` - `v0.13.1`](#google_mlkit_language_id---v0131)
2430
- [`google_mlkit_object_detection` - `v0.15.1`](#google_mlkit_object_detection---v0151)
@@ -34,8 +40,72 @@ Packages with changes:
3440
#### `google_ml_kit` - `v0.20.1`
3541

3642
* Update all native dependencies to latest versions
43+
* Add support for Google's ML Kit GenAI APIs:
44+
- `google_mlkit_genai_summarization` - Generate summaries of articles and conversations
45+
- `google_mlkit_genai_proofreading` - Check grammar and spelling
46+
- `google_mlkit_genai_rewriting` - Rewrite text in different styles
47+
- `google_mlkit_genai_image_description` - Generate descriptions for images
48+
- `google_mlkit_genai_speech_recognition` - Transcribe speech to text
49+
- `google_mlkit_genai_prompt` - Generate text content based on custom prompts
3750
* See individual package changelogs for specific version updates
3851

52+
#### `google_mlkit_genai_summarization` - `v0.1.0`
53+
54+
* Initial release of Google's ML Kit GenAI Summarization API for Flutter
55+
* Support for Android platform (API level 26+)
56+
* Features:
57+
- Generate summaries of articles and conversations
58+
- Support for multiple input types (article, conversation)
59+
- Support for multiple output types (1-3 bullet points)
60+
- Support for multiple languages (English, Japanese, Korean)
61+
- Feature status checking and downloading
62+
63+
#### `google_mlkit_genai_proofreading` - `v0.1.0`
64+
65+
* Initial release of Google's ML Kit GenAI Proofreading API for Flutter
66+
* Support for Android platform (API level 26+)
67+
* Features:
68+
- Check grammar and spelling in text
69+
- Support for multiple input types (keyboard, voice)
70+
- Support for multiple languages (English, Japanese, French, German, Italian, Spanish, Korean)
71+
- Feature status checking and downloading
72+
73+
#### `google_mlkit_genai_rewriting` - `v0.1.0`
74+
75+
* Initial release of Google's ML Kit GenAI Rewriting API for Flutter
76+
* Support for Android platform (API level 26+)
77+
* Features:
78+
- Rewrite text in different styles (formal, concise, emoji)
79+
- Support for multiple languages (English, Japanese, Korean)
80+
- Feature status checking and downloading
81+
82+
#### `google_mlkit_genai_image_description` - `v0.1.0`
83+
84+
* Initial release of Google's ML Kit GenAI Image Description API for Flutter
85+
* Support for Android platform (API level 26+)
86+
* Features:
87+
- Generate descriptions for images
88+
- Support for multiple image input formats
89+
- Feature status checking and downloading
90+
91+
#### `google_mlkit_genai_speech_recognition` - `v0.1.0`
92+
93+
* Initial release of Google's ML Kit GenAI Speech Recognition API for Flutter
94+
* Support for Android platform (API level 26+)
95+
* Features:
96+
- Transcribe speech to text in real time
97+
- Streaming recognition support
98+
- Feature status checking
99+
100+
#### `google_mlkit_genai_prompt` - `v0.1.0`
101+
102+
* Initial release of Google's ML Kit GenAI Prompt API for Flutter
103+
* Support for Android platform (API level 26+)
104+
* Features:
105+
- Generate text content based on custom prompts
106+
- Support for text-only and multimodal (image + text) prompts
107+
- Feature status checking and downloading
108+
39109
#### `google_mlkit_barcode_scanning` - `v0.14.2`
40110

41111
* Update Android native library `com.google.mlkit:barcode-scanning` to 17.3.0

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Bharat Biradar and Francisco Bernal.
3+
Copyright (c) 2026 flutter-ml.dev.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ Google's ML Kit for Flutter is a set of [Flutter plugins](https://flutter.io/pla
2929
| [Smart Reply](https://developers.google.com/ml-kit/language/smart-reply) | [google_mlkit_smart_reply](https://pub.dev/packages/google_mlkit_smart_reply) [![Pub Version](https://img.shields.io/pub/v/google_mlkit_smart_reply)](https://pub.dev/packages/google_mlkit_smart_reply) | [![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/flutter-ml/google_ml_kit_flutter/tree/master/packages/google_mlkit_smart_reply) |||
3030
| [Entity Extraction (Beta)](https://developers.google.com/ml-kit/language/entity-extraction) | [google_mlkit_entity_extraction](https://pub.dev/packages/google_mlkit_entity_extraction) [![Pub Version](https://img.shields.io/pub/v/google_mlkit_entity_extraction)](https://pub.dev/packages/google_mlkit_entity_extraction) | [![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/flutter-ml/google_ml_kit_flutter/tree/master/packages/google_mlkit_entity_extraction) |||
3131

32+
### GenAI APIs
33+
34+
| Feature | Plugin | Source Code | Android | iOS |
35+
|---------------------------------------------------------------------------------------------| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --- |
36+
| [Summarization (Beta)](https://developers.google.com/ml-kit/genai/summarization) | [google_mlkit_genai_summarization](https://pub.dev/packages/google_mlkit_genai_summarization) [![Pub Version](https://img.shields.io/pub/v/google_mlkit_genai_summarization)](https://pub.dev/packages/google_mlkit_genai_summarization) | [![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/flutter-ml/google_ml_kit_flutter/tree/master/packages/google_mlkit_genai_summarization) |||
37+
| [Proofreading (Beta)](https://developers.google.com/ml-kit/genai/proofreading) | [google_mlkit_genai_proofreading](https://pub.dev/packages/google_mlkit_genai_proofreading) [![Pub Version](https://img.shields.io/pub/v/google_mlkit_genai_proofreading)](https://pub.dev/packages/google_mlkit_genai_proofreading) | [![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/flutter-ml/google_ml_kit_flutter/tree/master/packages/google_mlkit_genai_proofreading) |||
38+
| [Rewriting (Beta)](https://developers.google.com/ml-kit/genai/rewriting) | [google_mlkit_genai_rewriting](https://pub.dev/packages/google_mlkit_genai_rewriting) [![Pub Version](https://img.shields.io/pub/v/google_mlkit_genai_rewriting)](https://pub.dev/packages/google_mlkit_genai_rewriting) | [![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/flutter-ml/google_ml_kit_flutter/tree/master/packages/google_mlkit_genai_rewriting) |||
39+
| [Image Description (Beta)](https://developers.google.com/ml-kit/genai/image-description) | [google_mlkit_genai_image_description](https://pub.dev/packages/google_mlkit_genai_image_description) [![Pub Version](https://img.shields.io/pub/v/google_mlkit_genai_image_description)](https://pub.dev/packages/google_mlkit_genai_image_description) | [![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/flutter-ml/google_ml_kit_flutter/tree/master/packages/google_mlkit_genai_image_description) |||
40+
| [Speech Recognition (Alpha)](https://developers.google.com/ml-kit/genai/speech-recognition) | [google_mlkit_genai_speech_recognition](https://pub.dev/packages/google_mlkit_genai_speech_recognition) [![Pub Version](https://img.shields.io/pub/v/google_mlkit_genai_speech_recognition)](https://pub.dev/packages/google_mlkit_genai_speech_recognition) | [![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/flutter-ml/google_ml_kit_flutter/tree/master/packages/google_mlkit_genai_speech_recognition) |||
41+
| [Prompt (Beta)](https://developers.google.com/ml-kit/genai/prompt) | [google_mlkit_genai_prompt](https://pub.dev/packages/google_mlkit_genai_prompt) [![Pub Version](https://img.shields.io/pub/v/google_mlkit_genai_prompt)](https://pub.dev/packages/google_mlkit_genai_prompt) | [![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/flutter-ml/google_ml_kit_flutter/tree/master/packages/google_mlkit_genai_prompt) |||
42+
3243
**PLEASE READ THIS** before continuing or posting a [new issue](https://github.com/flutter-ml/google_ml_kit_flutter/issues):
3344

3445
- [Google's ML Kit](https://developers.google.com/ml-kit) was build only for mobile platforms: iOS and Android apps. Web or any other platform is not supported, you can request support for those platform to Google in [their repo](https://github.com/googlesamples/mlkit/issues).

packages/example/ios/Podfile.lock

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ PODS:
2424
- google_mlkit_face_mesh_detection (0.4.2):
2525
- Flutter
2626
- google_mlkit_commons
27+
- google_mlkit_genai_image_description (0.1.0):
28+
- Flutter
29+
- google_mlkit_genai_prompt (0.1.0):
30+
- Flutter
31+
- google_mlkit_genai_proofreading (0.1.0):
32+
- Flutter
33+
- google_mlkit_genai_rewriting (0.1.0):
34+
- Flutter
35+
- google_mlkit_genai_speech_recognition (0.1.0):
36+
- Flutter
37+
- google_mlkit_genai_summarization (0.1.0):
38+
- Flutter
2739
- google_mlkit_image_labeling (0.14.2):
2840
- Flutter
2941
- google_mlkit_commons
@@ -272,6 +284,12 @@ DEPENDENCIES:
272284
- google_mlkit_entity_extraction (from `.symlinks/plugins/google_mlkit_entity_extraction/ios`)
273285
- google_mlkit_face_detection (from `.symlinks/plugins/google_mlkit_face_detection/ios`)
274286
- google_mlkit_face_mesh_detection (from `.symlinks/plugins/google_mlkit_face_mesh_detection/ios`)
287+
- google_mlkit_genai_image_description (from `.symlinks/plugins/google_mlkit_genai_image_description/ios`)
288+
- google_mlkit_genai_prompt (from `.symlinks/plugins/google_mlkit_genai_prompt/ios`)
289+
- google_mlkit_genai_proofreading (from `.symlinks/plugins/google_mlkit_genai_proofreading/ios`)
290+
- google_mlkit_genai_rewriting (from `.symlinks/plugins/google_mlkit_genai_rewriting/ios`)
291+
- google_mlkit_genai_speech_recognition (from `.symlinks/plugins/google_mlkit_genai_speech_recognition/ios`)
292+
- google_mlkit_genai_summarization (from `.symlinks/plugins/google_mlkit_genai_summarization/ios`)
275293
- google_mlkit_image_labeling (from `.symlinks/plugins/google_mlkit_image_labeling/ios`)
276294
- google_mlkit_language_id (from `.symlinks/plugins/google_mlkit_language_id/ios`)
277295
- google_mlkit_object_detection (from `.symlinks/plugins/google_mlkit_object_detection/ios`)
@@ -345,6 +363,18 @@ EXTERNAL SOURCES:
345363
:path: ".symlinks/plugins/google_mlkit_face_detection/ios"
346364
google_mlkit_face_mesh_detection:
347365
:path: ".symlinks/plugins/google_mlkit_face_mesh_detection/ios"
366+
google_mlkit_genai_image_description:
367+
:path: ".symlinks/plugins/google_mlkit_genai_image_description/ios"
368+
google_mlkit_genai_prompt:
369+
:path: ".symlinks/plugins/google_mlkit_genai_prompt/ios"
370+
google_mlkit_genai_proofreading:
371+
:path: ".symlinks/plugins/google_mlkit_genai_proofreading/ios"
372+
google_mlkit_genai_rewriting:
373+
:path: ".symlinks/plugins/google_mlkit_genai_rewriting/ios"
374+
google_mlkit_genai_speech_recognition:
375+
:path: ".symlinks/plugins/google_mlkit_genai_speech_recognition/ios"
376+
google_mlkit_genai_summarization:
377+
:path: ".symlinks/plugins/google_mlkit_genai_summarization/ios"
348378
google_mlkit_image_labeling:
349379
:path: ".symlinks/plugins/google_mlkit_image_labeling/ios"
350380
google_mlkit_language_id:
@@ -373,6 +403,12 @@ SPEC CHECKSUMS:
373403
google_mlkit_entity_extraction: 45de8519319089085569ef9e10e2500b8d0d55a0
374404
google_mlkit_face_detection: ee4b72cfae062b4c972204be955d83055a4bfd36
375405
google_mlkit_face_mesh_detection: 644aad01e609e0962bc38495d1d807e2ae9f5e1b
406+
google_mlkit_genai_image_description: 84e90c2ad87ae5e2f05cc4d5f1924059c799fc12
407+
google_mlkit_genai_prompt: f4a41c9548172a86c6723e5c83c1c3295b6ad299
408+
google_mlkit_genai_proofreading: 09ca9edfaa66e58ff165d2047286c10ba0a831ca
409+
google_mlkit_genai_rewriting: 7a647b345cf7d9fe8fda004142ca980abbba9724
410+
google_mlkit_genai_speech_recognition: 783fd846946877dc812a81d629c676b41973ce72
411+
google_mlkit_genai_summarization: 8d750cfca622746aef09d6521bf2e764e8647ded
376412
google_mlkit_image_labeling: 6f6fdb11c14600e01898e59a8c4413b255ede272
377413
google_mlkit_language_id: de6f5cc02967420549c3c3a1624b359217442db9
378414
google_mlkit_object_detection: 6a81b32faf7a9b700bed7a2caa67254818553257

packages/example/lib/main.dart

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,26 @@ class Home extends StatelessWidget {
8585
CustomCard('Entity Extraction', EntityExtractionView()),
8686
],
8787
),
88+
SizedBox(
89+
height: 20,
90+
),
91+
if (Platform.isAndroid)
92+
ExpansionTile(
93+
title: const Text('GenAI APIs'),
94+
children: [
95+
CustomCard('Summarization',
96+
_GenAIPlaceholderView('Summarization')),
97+
CustomCard('Proofreading',
98+
_GenAIPlaceholderView('Proofreading')),
99+
CustomCard(
100+
'Rewriting', _GenAIPlaceholderView('Rewriting')),
101+
CustomCard('Image Description',
102+
_GenAIPlaceholderView('Image Description')),
103+
CustomCard('Speech Recognition',
104+
_GenAIPlaceholderView('Speech Recognition')),
105+
CustomCard('Prompt', _GenAIPlaceholderView('Prompt')),
106+
],
107+
),
88108
],
89109
),
90110
),
@@ -95,6 +115,55 @@ class Home extends StatelessWidget {
95115
}
96116
}
97117

118+
class _GenAIPlaceholderView extends StatelessWidget {
119+
final String featureName;
120+
121+
const _GenAIPlaceholderView(this.featureName);
122+
123+
@override
124+
Widget build(BuildContext context) {
125+
return Scaffold(
126+
appBar: AppBar(
127+
title: Text('$featureName (GenAI)'),
128+
),
129+
body: Center(
130+
child: Padding(
131+
padding: const EdgeInsets.all(16.0),
132+
child: Column(
133+
mainAxisAlignment: MainAxisAlignment.center,
134+
children: [
135+
Icon(
136+
Icons.info_outline,
137+
size: 64,
138+
color: Colors.blue,
139+
),
140+
SizedBox(height: 16),
141+
Text(
142+
'$featureName API',
143+
style: Theme.of(context).textTheme.headlineSmall,
144+
),
145+
SizedBox(height: 16),
146+
Text(
147+
'This GenAI feature is available on Android devices with API level 26 or higher.',
148+
textAlign: TextAlign.center,
149+
style: Theme.of(context).textTheme.bodyMedium,
150+
),
151+
SizedBox(height: 8),
152+
Text(
153+
'Implementation coming soon.',
154+
textAlign: TextAlign.center,
155+
style: Theme.of(context).textTheme.bodySmall?.copyWith(
156+
fontStyle: FontStyle.italic,
157+
),
158+
),
159+
],
160+
),
161+
),
162+
),
163+
);
164+
}
165+
}
166+
98167
class CustomCard extends StatelessWidget {
99168
final String _label;
100169
final Widget _viewPage;

packages/example/pubspec.lock

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,48 @@ packages:
233233
relative: true
234234
source: path
235235
version: "0.4.2"
236+
google_mlkit_genai_image_description:
237+
dependency: "direct main"
238+
description:
239+
path: "../google_mlkit_genai_image_description"
240+
relative: true
241+
source: path
242+
version: "0.1.0"
243+
google_mlkit_genai_prompt:
244+
dependency: "direct main"
245+
description:
246+
path: "../google_mlkit_genai_prompt"
247+
relative: true
248+
source: path
249+
version: "0.1.0"
250+
google_mlkit_genai_proofreading:
251+
dependency: "direct main"
252+
description:
253+
path: "../google_mlkit_genai_proofreading"
254+
relative: true
255+
source: path
256+
version: "0.1.0"
257+
google_mlkit_genai_rewriting:
258+
dependency: "direct main"
259+
description:
260+
path: "../google_mlkit_genai_rewriting"
261+
relative: true
262+
source: path
263+
version: "0.1.0"
264+
google_mlkit_genai_speech_recognition:
265+
dependency: "direct main"
266+
description:
267+
path: "../google_mlkit_genai_speech_recognition"
268+
relative: true
269+
source: path
270+
version: "0.1.0"
271+
google_mlkit_genai_summarization:
272+
dependency: "direct main"
273+
description:
274+
path: "../google_mlkit_genai_summarization"
275+
relative: true
276+
source: path
277+
version: "0.1.0"
236278
google_mlkit_image_labeling:
237279
dependency: "direct main"
238280
description:

packages/example/pubspec.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@ dependencies:
5555
google_mlkit_smart_reply:
5656
path: ../google_mlkit_smart_reply
5757

58+
google_mlkit_genai_summarization:
59+
path: ../google_mlkit_genai_summarization
60+
google_mlkit_genai_proofreading:
61+
path: ../google_mlkit_genai_proofreading
62+
google_mlkit_genai_rewriting:
63+
path: ../google_mlkit_genai_rewriting
64+
google_mlkit_genai_image_description:
65+
path: ../google_mlkit_genai_image_description
66+
google_mlkit_genai_speech_recognition:
67+
path: ../google_mlkit_genai_speech_recognition
68+
google_mlkit_genai_prompt:
69+
path: ../google_mlkit_genai_prompt
70+
5871
dependency_overrides:
5972
google_mlkit_commons:
6073
path: ../google_mlkit_commons

packages/google_ml_kit/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Francisco Bernal and Bharat Biradar.
3+
Copyright (c) 2026 flutter-ml.dev.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)