首页 > 解决方案 > 由于 firebase_database,Dart 迁移失败

问题描述

当我尝试跑步时

dart migrate

我得到:

Bad state: Error: package has unmigrated dependencies.

Before migrating your package, we recommend ensuring that every library it
imports (either directly or indirectly) has been migrated to null safety, so
that you will be able to run your unit tests in sound null checking mode.  You
are currently importing the following non-null-safe libraries:

  package:firebase_database/firebase_database.dart
  package:firebase_database/src/utils/push_id_generator.dart

但是当我运行 flutter pub 时会过时

flutter pub outdated --mode=null-safety
Showing dependencies that are currently not opted in to null-safety.
[✗] indicates versions without null safety support.
[✓] indicates versions opting in to null safety.

All your dependencies declare support for null-safety.

在我的 pubscpec.yaml

  firebase_database: ^6.1.0

标签: firebaseflutterdart

解决方案


推荐阅读