Skip to content

Commit 0c3d993

Browse files
committed
Fix deprecated values
1 parent 18f7565 commit 0c3d993

File tree

3 files changed

+10
-7
lines changed
  • packages
    • firebase_ai/firebase_ai/example/lib
    • firebase_database/firebase_database_web/lib/src/interop
    • firebase_vertexai/firebase_vertexai/example/lib

3 files changed

+10
-7
lines changed

packages/firebase_ai/firebase_ai/example/lib/main.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,9 @@ class _HomeScreenState extends State<HomeScreen> {
230230
onChanged: widget.onBackendChanged,
231231
activeTrackColor: Colors.green.withValues(alpha: 0.5),
232232
inactiveTrackColor: Colors.blueGrey.withValues(alpha: 0.5),
233-
activeThumbColor: Colors.green,
233+
// Ignore until activeThumbColor is availble on stable channel.
234+
// ignore: deprecated_member_use
235+
activeColor: Colors.green,
234236
inactiveThumbColor: Colors.blueGrey,
235237
),
236238
Text(

packages/firebase_database/firebase_database_web/lib/src/interop/database.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -676,12 +676,11 @@ class OnDisconnect
676676
/// See: <https://firebase.google.com/docs/reference/js/firebase.database.ThenableReference>.
677677
class ThenableReference
678678
extends DatabaseReference<database_interop.ThenableReferenceJsImpl> {
679-
late final Future<DatabaseReference> _future = jsObject
680-
.then(((database_interop.ReferenceJsImpl reference) {
681-
DatabaseReference.getInstance(reference);
682-
}).toJS)
679+
late final Future<DatabaseReference> _future = (jsObject as JSPromise)
683680
.toDart
684-
.then((value) => value! as DatabaseReference);
681+
.then((value) => DatabaseReference.getInstance(
682+
value as database_interop.ReferenceJsImpl,
683+
));
685684

686685
/// Creates a new ThenableReference from a [jsObject].
687686
ThenableReference.fromJsObject(

packages/firebase_vertexai/firebase_vertexai/example/lib/main.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,9 @@ class _HomeScreenState extends State<HomeScreen> {
232232
onChanged: widget.onBackendChanged,
233233
activeTrackColor: Colors.green.withValues(alpha: 0.5),
234234
inactiveTrackColor: Colors.blueGrey.withValues(alpha: 0.5),
235-
activeThumbColor: Colors.green,
235+
// Ignore until activeThumbColor is availble on stable channel.
236+
// ignore: deprecated_member_use
237+
activeColor: Colors.green,
236238
inactiveThumbColor: Colors.blueGrey,
237239
),
238240
Text(

0 commit comments

Comments
 (0)