Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[翻译完成] src/docs/release/breaking-changes/index.md #871

Merged
merged 7 commits into from Jun 27, 2021
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
109 changes: 109 additions & 0 deletions src/docs/release/breaking-changes/index.md
Expand Up @@ -9,41 +9,85 @@ As described in the [breaking change policy][],
on occasion we publish guides
for migrating code across a breaking change.

正如 [重要改动策略][breaking change policy] 中描述的,
我们会不定期地发布关于重要改动的迁移指南。

The following guides are available. They are sorted by
release, and listed in alphabetical order:

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

### Not yet released to stable

### 尚未发布稳定版

* [Default Scrollbars on Desktop][]

[桌面端的默认滚动条][Default Scrollbars on Desktop]
* [ThemeData's accent properties have been deprecated][]

[弃用 ThemeData 的强调属性]

[Default Scrollbars on Desktop]: /docs/release/breaking-changes/default-desktop-scrollbars
[ThemeData's accent properties have been deprecated]: /docs/release/breaking-changes/theme-data-accent-properties

### Reverted changes

### 回退改动

The following breaking changes have been reverted.

以下重要改动已被回退。

<b>[Network Policy on iOS and Android][]</b><br>
: Introduced in version: 2.0.0<br>
Reverted in version: 2.2.0 (proposed)

<b>[iOS 端和 Android 端的网络策略][Network Policy on iOS and Android]</b><br>
<br> 引入版本:2.0.0<br>
AlexV525 marked this conversation as resolved.
Show resolved Hide resolved
回退版本:2.2.0(建议)

[Network Policy on iOS and Android]: /docs/release/breaking-changes/network-policy-ios-android

### Released in Flutter 2

### 发布于 Flutter 2

* [Added BuildContext parameter to TextEditingController.buildTextSpan][]

[为 TextEditingController.buildTextSpan 添加 BuildContext 参数][Added BuildContext parameter to TextEditingController.buildTextSpan]
kecrily marked this conversation as resolved.
Show resolved Hide resolved
* [Android ActivityControlSurface attachToActivity signature change][]

[变更 Android 端 ActivityControlSurface attachToActivity 签名][Android ActivityControlSurface attachToActivity signature change]
* [Android FlutterMain.setIsRunningInRobolectricTest testing API removed][]

[移除 Android 端 FlutterMain.setIsRunningInRobolectricTest 测试 API][Android FlutterMain.setIsRunningInRobolectricTest testing API removed]
* [Clip behavior][]

[剪裁行为][Clip behavior]
* [Deprecated API removed after v1.22][]

[移除 v1.22 后过时的 API][Deprecated API removed after v1.22]
* [Dry layout support for RenderBox][]

[对 RenderBox 的 Dry 布局支持][Dry layout support for RenderBox](译者注:Dry 即 Don't repeat yourself,意思为不要重复自己)
* [Eliminating nullOk Parameters][]

[取消 nullOk 参数][Eliminating nullOk Parameters]
* [Material Chip button semantics][]

[语义化 Material 纸片按钮][Material Chip button semantics]
* [SnackBars managed by the ScaffoldMessenger][]

[由 ScaffoldMessenger 管理 Snackbar][SnackBars managed by the ScaffoldMessenger]
* [TextSelectionTheme migration][]

[迁移 TextSelectionTheme][TextSelectionTheme migration]
* [Use maxLengthEnforcement instead of maxLengthEnforced][]

[使用 maxLengthEnforcement 代替 maxLengthEnforced][Use maxLengthEnforcement instead of maxLengthEnforced]

[Added BuildContext parameter to TextEditingController.buildTextSpan]: /docs/release/breaking-changes/buildtextspan-buildcontext
[Android ActivityControlSurface attachToActivity signature change]: /docs/release/breaking-changes/android-activity-control-surface-attach
[Android FlutterMain.setIsRunningInRobolectricTest testing API removed]: /docs/release/breaking-changes/android-setIsRunningInRobolectricTest-removed
Expand All @@ -58,30 +102,62 @@ The following breaking changes have been reverted.

### Released in Flutter 1.22

### 发布于 Flutter 1.22

* [Android v1 embedding app and plugin creation deprecation][]

[废弃 Android v1 嵌入式应用和插件的创建][Android v1 embedding app and plugin creation deprecation]
* [Cupertino icons 1.0.0][]

[Cupertino 图标 1.0.0][Cupertino icons 1.0.0]
* [The new Form, FormField auto-validation API][]

[新的表单、表单字段自动验证 API][The new Form, FormField auto-validation API]


[Android v1 embedding app and plugin creation deprecation]: /docs/release/breaking-changes/android-v1-embedding-create-deprecation
[Cupertino icons 1.0.0]: /docs/release/breaking-changes/cupertino-icons-1.0.0
[The new Form, FormField auto-validation API]: /docs/release/breaking-changes/form-field-autovalidation-api

### Released in Flutter 1.20

### 发布于 Flutter 1.20

* [Actions API revision][]

[修正 Actions API][Actions API revision]
* [Adding TextInputClient.currentAutofillScope property][]

[添加 TextInputClient.currentAutofillScope 属性][Adding TextInputClient.currentAutofillScope property]
* [New Buttons and Button Themes][]

[新的按钮组和按钮主题][New Buttons and Button Themes]
AlexV525 marked this conversation as resolved.
Show resolved Hide resolved
* [Dialogs' Default BorderRadius][]

[对话框的默认圆角][Dialogs' Default BorderRadius]
* [More Strict Assertions in the Navigator and the Hero Controller Scope][]

[在导航和 Hero Controller 范围内使用更加严格的断言][More Strict Assertions in the Navigator and the Hero Controller Scope]
* [The Route Transition record and Transition delegate updates][]

[更新路由 Transition 值和 Transition delegate][The Route Transition record and Transition delegate updates]
* [The RenderEditable needs to be laid out before hit testing][]

[RenderEditable 需要在点击测试前进行布局][The RenderEditable needs to be laid out before hit testing]
* [Reversing the dependency between the scheduler and services layer][]

[反转调度器和服务层之间的依赖关系][Reversing the dependency between the scheduler and services layer]
* [Semantics Order of the Overlay Entries in Modal Routes][]

[语义化路由模型中的 Overlay 项][Semantics Order of the Overlay Entries in Modal Routes]
* [showAutocorrectionPromptRect method added to TextInputClient][]

[TextInputClient 增加 showAutocorrectionPromptRect 方法][showAutocorrectionPromptRect method added to TextInputClient]
* [TestWidgetsFlutterBinding.clock][]
* [TextField requires MaterialLocalizations][]

[文本字段需要 MaterialLocalizations 类][TextField requires MaterialLocalizations]

[Actions API revision]: /docs/release/breaking-changes/actions-api-revision
[Adding TextInputClient.currentAutofillScope property]: /docs/release/breaking-changes/add-currentAutofillScope-to-TextInputClient
[New Buttons and Button Themes]: /docs/release/breaking-changes/buttons
Expand All @@ -98,23 +174,56 @@ The following breaking changes have been reverted.
### Released in Flutter 1.17

* [Adding 'linux' and 'windows' to TargetPlatform enum][]

[在 TargetPlatform 枚举中添加 'linux' 和 'windows'][Adding 'linux' and 'windows' to TargetPlatform enum]
* [Annotations return local position relative to object][]

[注释返回局部对象的相对位置][Annotations return local position relative to object]
* [Container color optimization][]

[容器颜色优化][Container color optimization]
* [CupertinoTabBar requires Localizations parent][]

[CupertinoTabBar 要有 Localizations 父级][CupertinoTabBar requires Localizations parent]
* [Generic type of ParentDataWidget changed to ParentData][]

[ParentDataWidget 的泛型改为 ParentData][Generic type of ParentDataWidget changed to ParentData]
* [ImageCache and ImageProvider changes][]

[ImageCache 和 ImageProvider 的更改][ImageCache and ImageProvider changes]
* [ImageCache large images][]

[ImageCache 缓存大图][ImageCache large images]
* [MouseTracker moved to rendering][]

[MouseTracker 移动至渲染][MouseTracker moved to rendering]
* [MouseTracker no longer attaches annotations][]

[MouseTracker 不再附加注释][MouseTracker no longer attaches annotations]
* [Nullable CupertinoTheme.brightness][]

[CupertinoTheme.brightness 允许为空值][Nullable CupertinoTheme.brightness]
* [Rebuild optimization for OverlayEntries and Routes][]

[重建并优化 OverlayEntries 和路由][Rebuild optimization for OverlayEntries and Routes]
* [Scrollable AlertDialog][]

[可滚动的对话框][Scrollable AlertDialog]
* [TestTextInput state reset][]
kecrily marked this conversation as resolved.
Show resolved Hide resolved

[][TestTextInput state reset]
* [TextInputClient currentTextEditingValue][]
* [The forgetChild() method must call super][]

[forgetChild() 必须调用 super][The forgetChild() method must call super]
* [The Route and Navigator refactoring][]

[重构路由和导航][The Route and Navigator refactoring]
* [FloatingActionButton and ThemeData's accent properties][]

[FloatingActionButton 和 ThemeData 的强调速度][FloatingActionButton and ThemeData's accent properties]


[Adding 'linux' and 'windows' to TargetPlatform enum]: /docs/release/breaking-changes/target-platform-linux-windows
[Annotations return local position relative to object]: /docs/release/breaking-changes/annotations-return-local-position-relative-to-object
[breaking change policy]: /docs/resources/compatibility
Expand Down