Deprecate M2 curves (#134417)
These have 1:1 replacements with a new name, introduced in https://github.com/flutter/flutter/pull/129942 Land after https://github.com/flutter/packages/pull/4898 Part of https://github.com/flutter/flutter/issues/116525 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
This commit is contained in:
@@ -897,9 +897,9 @@ transforms:
|
||||
oldName: 'showTrackOnHover'
|
||||
newName: 'trackVisibility'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/129942
|
||||
# Changes made in https://github.com/flutter/flutter/pull/134417
|
||||
- title: "Migrate to 'Easing.legacy'"
|
||||
date: 2023-07-04
|
||||
date: 2023-12-12
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
variable: 'standardEasing'
|
||||
@@ -910,9 +910,9 @@ transforms:
|
||||
field: legacy
|
||||
inClass: Easing
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/129942
|
||||
# Changes made in https://github.com/flutter/flutter/pull/134417
|
||||
- title: "Migrate to 'Easing.legacyAccelerate'"
|
||||
date: 2023-07-04
|
||||
date: 2023-12-12
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
variable: 'accelerateEasing'
|
||||
@@ -923,9 +923,9 @@ transforms:
|
||||
field: legacyAccelerate
|
||||
inClass: Easing
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/129942
|
||||
# Changes made in https://github.com/flutter/flutter/pull/134417
|
||||
- title: "Migrate to 'Easing.legacyDecelerate'"
|
||||
date: 2023-07-04
|
||||
date: 2023-12-12
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
variable: 'decelerateEasing'
|
||||
|
||||
@@ -6,9 +6,7 @@ import 'package:flutter/animation.dart';
|
||||
|
||||
// The easing curves of the Material Library
|
||||
|
||||
// TODO(guidezpl): deprecate the three curves below once customers (packages/plugins) are migrated
|
||||
|
||||
/// The standard easing curve in the Material specification.
|
||||
/// The standard easing curve in the Material 2 specification.
|
||||
///
|
||||
/// Elements that begin and end at rest use standard easing.
|
||||
/// They speed up quickly and slow down gradually, in order
|
||||
@@ -16,18 +14,28 @@ import 'package:flutter/animation.dart';
|
||||
///
|
||||
/// See also:
|
||||
/// * <https://material.io/design/motion/speed.html#easing>
|
||||
@Deprecated(
|
||||
'Use Easing.legacy (M2) or Easing.standard (M3) instead. '
|
||||
'This curve is updated in M3. '
|
||||
'This feature was deprecated after v3.18.0-0.1.pre.'
|
||||
)
|
||||
const Curve standardEasing = Curves.fastOutSlowIn;
|
||||
|
||||
/// The accelerate easing curve in the Material specification.
|
||||
/// The accelerate easing curve in the Material 2 specification.
|
||||
///
|
||||
/// Elements exiting a screen use acceleration easing,
|
||||
/// where they start at rest and end at peak velocity.
|
||||
///
|
||||
/// See also:
|
||||
/// * <https://material.io/design/motion/speed.html#easing>
|
||||
@Deprecated(
|
||||
'Use Easing.legacyAccelerate (M2) or Easing.standardAccelerate (M3) instead. '
|
||||
'This curve is updated in M3. '
|
||||
'This feature was deprecated after v3.18.0-0.1.pre.'
|
||||
)
|
||||
const Curve accelerateEasing = Cubic(0.4, 0.0, 1.0, 1.0);
|
||||
|
||||
/// The decelerate easing curve in the Material specification.
|
||||
/// The decelerate easing curve in the Material 2 specification.
|
||||
///
|
||||
/// Incoming elements are animated using deceleration easing,
|
||||
/// which starts a transition at peak velocity (the fastest
|
||||
@@ -35,4 +43,9 @@ const Curve accelerateEasing = Cubic(0.4, 0.0, 1.0, 1.0);
|
||||
///
|
||||
/// See also:
|
||||
/// * <https://material.io/design/motion/speed.html#easing>
|
||||
@Deprecated(
|
||||
'Use Easing.legacyDecelerate (M2) or Easing.standardDecelerate (M3) instead. '
|
||||
'This curve is updated in M3. '
|
||||
'This feature was deprecated after v3.18.0-0.1.pre.'
|
||||
)
|
||||
const Curve decelerateEasing = Cubic(0.0, 0.0, 0.2, 1.0);
|
||||
|
||||
@@ -318,11 +318,10 @@ void main() {
|
||||
);
|
||||
final Clip clip = details.clipBehavior;
|
||||
|
||||
// Changes made in https://github.com/flutter/flutter/pull/129942
|
||||
// TODO(guidezpl): enable fix after https://github.com/dart-lang/sdk/issues/52902
|
||||
// const Curve curve = standardEasing; expect Easing.legacy
|
||||
// const Curve curve = accelerateEasing; expect Easing.legacyAccelerate
|
||||
// const Curve curve = decelerateEasing; expect Easing.legacyDecelerate
|
||||
// Changes made in https://github.com/flutter/flutter/pull/134417
|
||||
const Curve curve = standardEasing;
|
||||
const Curve curve = accelerateEasing;
|
||||
const Curve curve = decelerateEasing;
|
||||
|
||||
final PlatformMenuBar platformMenuBar = PlatformMenuBar(menus: <PlatformMenuItem>[], body: const SizedBox());
|
||||
final Widget bodyValue = platformMenuBar.body;
|
||||
|
||||
@@ -314,11 +314,10 @@ void main() {
|
||||
);
|
||||
final Clip clip = details.decorationClipBehavior;
|
||||
|
||||
// Changes made in https://github.com/flutter/flutter/pull/129942
|
||||
// TODO(guidezpl): enable fix after https://github.com/dart-lang/sdk/issues/52902
|
||||
// const Curve curve = standardEasing; expect Easing.legacy
|
||||
// const Curve curve = accelerateEasing; expect Easing.legacyAccelerate
|
||||
// const Curve curve = decelerateEasing; expect Easing.legacyDecelerate
|
||||
// Changes made in https://github.com/flutter/flutter/pull/134417
|
||||
const Curve curve = Easing.legacy;
|
||||
const Curve curve = Easing.legacyAccelerate;
|
||||
const Curve curve = Easing.legacyDecelerate;
|
||||
|
||||
final PlatformMenuBar platformMenuBar = PlatformMenuBar(menus: <PlatformMenuItem>[], child: const SizedBox());
|
||||
final Widget bodyValue = platformMenuBar.child;
|
||||
|
||||
Reference in New Issue
Block a user