破坏性改动 (Breaking changes) 及迁移指南

正如 破坏性改动策略 中描述的,我们会不定期地发布关于破坏性改动的迁移指南。

你可以加入 Flutter announceDart announce,以获得关于未来破坏性改动的通知。

当你在升级 Flutter 后遇到 Dart 错误时,可以考虑使用 dart fix 命令自动迁移你的代码。并非所有的破坏性改动都支持这种方式,但很多都是支持的。

为了避免被未来的 Flutter 版本破坏,可以考虑将你的测试提交到我们的 测试注册表

所有版本的破坏性改动

#

以下是可用的迁移指南,它们按发行版本分类并按字母顺序排列。

Not yet released to stable

#

Released in Flutter 3.24

#

Released in Flutter 3.22

#

Released in Flutter 3.19

#

Released in Flutter 3.16

#

Released in Flutter 3.13

#

Released in Flutter 3.10

#

Released in Flutter 3.7

#

Released in Flutter 3.3

#

Released in Flutter 3

#

Released in Flutter 2.10

#

Released in Flutter 2.5

#

Reverted change in 2.2

#

The following breaking change was reverted in release 2.2:

Network Policy on iOS and Android
Introduced in version: 2.0.0
Reverted in version: 2.2.0

Released in Flutter 2.2

#

Released in Flutter 2

#

Released in Flutter 1.22

#

Released in Flutter 1.20

#

Released in Flutter 1.17

#