破坏性改动 (Breaking changes)
正如 破坏性改动策略 中描述的,我们会不定期地发布关于破坏性改动的迁移指南。
以下是可用的迁移指南,它们按发行版本分类并按字母顺序排列。
尚未发布到稳定版
- Migrate
of
to non-nullable return values, and addmaybeOf
- Removed RouteSettings.copyWith
- Deprecated API removed after v3.3
- iOS FlutterViewController splashScreenView made nullable
- ThemeData’s toggleableActiveColor property has been deprecated
Released in Flutter 3.3
- Adding ImageProvider.loadBuffer
- Default PrimaryScrollController on Desktop
- Trackpad gestures can trigger GestureRecognizer
Released in Flutter 3
- Deprecated API removed after v2.10
- Page transitions replaced by ZoomPageTransitionsBuilder
- Migrate useDeleteButtonTooltip to deleteButtonTooltipMessage of Chips
已经在 Flutter 2.10 中发布
- Deprecated API removed after v2.5
- Raw images on Web uses correct origin and colors
- Required Kotlin version
- Scribble Text Input Client
已经在 Flutter 2.5 中发布
- Default drag scrolling devices
- Deprecated API removed after v2.2
- Change the enterText method to move the caret to the end of the input text
- GestureRecognizer Cleanup
- Introducing package:flutter_lints
- Replace AnimationSheetBuilder.display with collate
- ThemeData’s accent properties have been deprecated
- Transition of platform channel test interfaces to flutter_test package
- Using HTML slots to render platform views in the web
在 2.2 版本中回退的改动
以下重要改动在 Flutter 2.2 中已被回退。
iOS 端和 Android 端的网络策略
引入版本:2.0.0
回退版本:2.2.0(建议)
发布于 Flutter 2.2
发布于 Flutter 2
- Added BuildContext parameter to TextEditingController.buildTextSpan
- Android ActivityControlSurface attachToActivity signature change
- Android FlutterMain.setIsRunningInRobolectricTest testing API removed
- Clip behavior
- Deprecated API removed after v1.22
- Dry layout support for RenderBox
- Eliminating nullOk Parameters
- Material Chip button semantics
- SnackBars managed by the ScaffoldMessenger
- TextSelectionTheme migration
- Use maxLengthEnforcement instead of maxLengthEnforced
- Transition of platform channel test interfaces to flutter_test package
发布于 Flutter 1.22
- Android v1 embedding app and plugin creation deprecation
- Cupertino icons 1.0.0
- The new Form, FormField auto-validation API
发布于 Flutter 1.20
- Actions API revision
- Adding TextInputClient.currentAutofillScope property
- New Buttons and Button Themes
- Dialogs’ Default BorderRadius
- More Strict Assertions in the Navigator and the Hero Controller Scope
- The Route Transition record and Transition delegate updates
- The RenderEditable needs to be laid out before hit testing
- Reversing the dependency between the scheduler and services layer
- Semantics Order of the Overlay Entries in Modal Routes
- showAutocorrectionPromptRect method added to TextInputClient
- TestWidgetsFlutterBinding.clock
- TextField requires MaterialLocalizations
发布于 Flutter 1.17
- Adding ‘linux’ and ‘windows’ to TargetPlatform enum
- Annotations return local position relative to object
- Container color optimization
- CupertinoTabBar requires Localizations parent
- Generic type of ParentDataWidget changed to ParentData
- ImageCache and ImageProvider changes
- ImageCache large images
- MouseTracker moved to rendering
- MouseTracker no longer attaches annotations
- Nullable CupertinoTheme.brightness
- Rebuild optimization for OverlayEntries and Routes
- Scrollable AlertDialog
- TestTextInput state reset
- TextInputClient currentTextEditingValue
- The forgetChild() method must call super
- The Route and Navigator refactoring
- FloatingActionButton and ThemeData’s accent properties