Skip to content

Commit fb20da9

Browse files
authored
feat(ml): adding depreciation notice to ML plugin (#18472)
* feat(ml): adding depreciation notice to ML plugin * fix ci
1 parent 85cbdca commit fb20da9

15 files changed

Lines changed: 80 additions & 3 deletions

File tree

docs/ml/use-custom-models.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ Book: /docs/_book.yaml
55

66
# Use a custom TensorFlow Lite model with Flutter
77

8+
<aside class="caution"><b>Firebase ML is deprecated.</b> The Firebase ML
9+
hosting service will shut down on June 15, 2027, and projects that did not
10+
previously use Firebase ML can no longer start using it. Existing projects
11+
should migrate hosted custom models to another solution before that date. See
12+
<a href="/docs/ml/migrate-to-cloud-storage">Migrate TensorFlow Lite models from
13+
Firebase ML to Cloud Storage</a>.</aside>
14+
815
If your app uses custom
916
[TensorFlow Lite](https://www.tensorflow.org/lite/){:.external} models, you can
1017
use Firebase ML to deploy your models. By deploying models with Firebase, you

docs/setup/_setup_main.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ Product | Plugin name
208208
[{{data_connect_short}}][dataconnect docs] | `firebase_data_connect` | {{YES}} | {{YES}} | {{YES}} | |
209209
[{{inappmessaging}}][fiam docs] | `firebase_in_app_messaging` | {{YES}} | {{YES}} | | |
210210
[{{firebase_installations}}][installations docs] | `firebase_app_installations` | {{YES}} | {{YES}} | {{YES}} | beta |
211-
[ML Model Downloader][ml docs] | `firebase_ml_model_downloader` | {{YES}} | {{YES}} | | beta |
211+
[ML Model Downloader][ml docs] | `firebase_ml_model_downloader` | {{YES}} | {{YES}} | | deprecated |
212212
[{{perfmon}}][perfmon docs] | `firebase_performance` | {{YES}} | {{YES}} | {{YES}} | |
213213
[{{database}}][rtdb docs] | `firebase_database` | {{YES}} | {{YES}} | {{YES}} | beta |
214214
[{{remote_config}}][remote config docs] | `firebase_remote_config` | {{YES}} | {{YES}} | {{YES}} | beta |

packages/firebase_ml_model_downloader/firebase_ml_model_downloader/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Firebase ML Model Downloader for Flutter
22
[![pub package](https://img.shields.io/pub/v/firebase_ml_model_downloader.svg)](https://pub.dev/packages/firebase_ml_model_downloader)
33

4+
> [!WARNING]
5+
> Firebase ML is deprecated and will shut down on June 15, 2027. Existing
6+
> projects should migrate hosted custom models to another solution before that
7+
> date. See the
8+
> [Cloud Storage migration guide](https://firebase.google.com/docs/ml/migrate-to-cloud-storage).
9+
410
A Flutter plugin to use the [Firebase ML Model Downloader API](https://firebase.google.com/docs/ml/).
511

612
## Getting Started

packages/firebase_ml_model_downloader/firebase_ml_model_downloader/example/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# firebase_ml_model_downloader_example
22

3+
> [!WARNING]
4+
> Firebase ML is deprecated and will shut down on June 15, 2027. Existing
5+
> projects should migrate hosted custom models to another solution before that
6+
> date. See the
7+
> [Cloud Storage migration guide](https://firebase.google.com/docs/ml/migrate-to-cloud-storage).
8+
39
Demonstrates how to use the firebase_ml_model_downloader plugin.
410

511
## Getting Started

packages/firebase_ml_model_downloader/firebase_ml_model_downloader/example/lib/main.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// This example intentionally demonstrates the deprecated package.
6+
// ignore_for_file: deprecated_member_use
7+
58
import 'package:firebase_core/firebase_core.dart';
69
import 'package:firebase_ml_model_downloader/firebase_ml_model_downloader.dart';
710
import 'package:flutter/material.dart';

packages/firebase_ml_model_downloader/firebase_ml_model_downloader/lib/firebase_ml_model_downloader.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// This package intentionally re-exports its deprecated public API.
6+
// ignore_for_file: deprecated_member_use
7+
58
import 'dart:async';
69

710
import 'package:firebase_core/firebase_core.dart';

packages/firebase_ml_model_downloader/firebase_ml_model_downloader/lib/src/firebase_ml_model_downloader.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,17 @@
44

55
part of '../firebase_ml_model_downloader.dart';
66

7+
@Deprecated(
8+
'Firebase ML is deprecated and will shut down on June 15, 2027. '
9+
'Migrate hosted custom models to another solution, such as Cloud Storage '
10+
'for Firebase. See https://firebase.google.com/docs/ml/migrate-to-cloud-storage.',
11+
)
712
class FirebaseModelDownloader extends FirebasePlugin {
13+
@Deprecated(
14+
'Firebase ML is deprecated and will shut down on June 15, 2027. '
15+
'Migrate hosted custom models to another solution, such as Cloud Storage '
16+
'for Firebase. See https://firebase.google.com/docs/ml/migrate-to-cloud-storage.',
17+
)
818
FirebaseModelDownloader._({required this.app})
919
: super(app.name, 'plugins.flutter.io/firebase_ml_model_downloader');
1020

@@ -34,6 +44,11 @@ class FirebaseModelDownloader extends FirebasePlugin {
3444
}
3545

3646
/// Returns an instance using a specified [FirebaseApp].
47+
@Deprecated(
48+
'Firebase ML is deprecated and will shut down on June 15, 2027. '
49+
'Migrate hosted custom models to another solution, such as Cloud Storage '
50+
'for Firebase. See https://firebase.google.com/docs/ml/migrate-to-cloud-storage.',
51+
)
3752
factory FirebaseModelDownloader.instanceFor({required FirebaseApp app}) {
3853
return _cachedInstances.putIfAbsent(app.name, () {
3954
return FirebaseModelDownloader._(app: app);

packages/firebase_ml_model_downloader/firebase_ml_model_downloader/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: firebase_ml_model_downloader
2-
description: A Flutter plugin allowing you to use Firebase Ml Model Downloader.
2+
description: "Deprecated: A Flutter plugin for Firebase ML Model Downloader. Firebase ML shuts down June 15, 2027."
33
version: 0.4.2+6
44
resolution: workspace
55
homepage: https://firebase.google.com/docs/ml/flutter/use-custom-models

packages/firebase_ml_model_downloader/firebase_ml_model_downloader/test/firebase_ml_model_downloader_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// These tests intentionally exercise the deprecated package.
6+
// ignore_for_file: deprecated_member_use
7+
58
import 'dart:io';
69

710
import 'package:firebase_ml_model_downloader/firebase_ml_model_downloader.dart';

packages/firebase_ml_model_downloader/firebase_ml_model_downloader_platform_interface/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# firebase_ml_model_downloader_platform_interface
22

3+
> [!WARNING]
4+
> Firebase ML is deprecated and will shut down on June 15, 2027. Existing
5+
> projects should migrate hosted custom models to another solution before that
6+
> date. See the
7+
> [Cloud Storage migration guide](https://firebase.google.com/docs/ml/migrate-to-cloud-storage).
8+
39
A common platform interface for the [`firebase_ml_model_downloader`][1] plugin.
410

511
This interface allows platform-specific implementations of the `firebase_ml_model_downloader`

0 commit comments

Comments
 (0)