-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[Reland] Introduce AnimationStyle
#138721
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
Created (internal Google link) cl/584079753 to enable landing this change. |
HansMuller
approved these changes
Nov 20, 2023
Contributor
HansMuller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 21, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 21, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 21, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 21, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 21, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 21, 2023
auto-submit bot
pushed a commit
to flutter/packages
that referenced
this pull request
Nov 21, 2023
Manual roll requested by [email protected] flutter/flutter@9c9e061...ab721f9 2023-11-21 [email protected] Roll Flutter Engine from 6da31e1bff67 to 746697c27569 (1 revision) (flutter/flutter#138826) 2023-11-21 [email protected] Add mhbdev to AUTHORS (flutter/flutter#138311) 2023-11-21 [email protected] Manual roll Flutter Engine from 70b1c7341255 to 6da31e1bff67 (10 revisions) (flutter/flutter#138817) 2023-11-21 [email protected] Fix Chips with Tooltip throw an assertion when enabling or disabling (flutter/flutter#138799) 2023-11-21 [email protected] Roll Packages from c5443ad to c9933fc (2 revisions) (flutter/flutter#138809) 2023-11-21 [email protected] Roll Flutter Engine from 3348fb0ca302 to 70b1c7341255 (1 revision) (flutter/flutter#138774) 2023-11-21 [email protected] Roll Flutter Engine from f3e9b38a2588 to 3348fb0ca302 (1 revision) (flutter/flutter#138772) 2023-11-21 [email protected] Roll Flutter Engine from 39fb4581cff2 to f3e9b38a2588 (3 revisions) (flutter/flutter#138770) 2023-11-21 [email protected] Add dartdoc warnings (flutter/flutter#138766) 2023-11-21 [email protected] Roll Flutter Engine from 6e8e55ef1a7f to 39fb4581cff2 (2 revisions) (flutter/flutter#138765) 2023-11-20 [email protected] Added Features requested in #137530 (flutter/flutter#137532) 2023-11-20 [email protected] Bump dartdoc to 7.0.2 (flutter/flutter#138760) 2023-11-20 [email protected] Roll Flutter Engine from 7a31543b4630 to 6e8e55ef1a7f (4 revisions) (flutter/flutter#138761) 2023-11-20 [email protected] [Reland] Introduce `AnimationStyle` (flutter/flutter#138721) 2023-11-20 [email protected] Roll Flutter Engine from 337ab58e81f7 to 7a31543b4630 (2 revisions) (flutter/flutter#138759) 2023-11-20 [email protected] Reland update bottom navigation bar test for m3 (flutter/flutter#137998) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
8 tasks
auto-submit bot
pushed a commit
that referenced
this pull request
Dec 6, 2023
fixes [Expose animation parameters for the [ExpansionTile] widget](#138047) ### Description Add `AnimationStyle` to the `ExpansionTile` widget to override the default expand and close animation. Syntax: ```dart child: ExpansionTile( title: const Text('Tap to expand'), expansionAnimationStyle: AnimationStyle( duration: Durations.extralong1, curve: Easing.emphasizedAccelerate, ), children: const <Widget>[FlutterLogo(size: 200)], ), ``` ### Code sample <details> <summary>expand to view the code sample</summary> ```dart // Copyright 2014 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; /// Flutter code sample for [ExpansionTile] and [AnimationStyle]. void main() { runApp(const ExpansionTileAnimationStyleApp()); } enum AnimationStyles { defaultStyle, custom, none } const List<(AnimationStyles, String)> animationStyleSegments = <(AnimationStyles, String)>[ (AnimationStyles.defaultStyle, 'Default'), (AnimationStyles.custom, 'Custom'), (AnimationStyles.none, 'None'), ]; class ExpansionTileAnimationStyleApp extends StatefulWidget { const ExpansionTileAnimationStyleApp({super.key}); @OverRide State<ExpansionTileAnimationStyleApp> createState() => _ExpansionTileAnimationStyleAppState(); } class _ExpansionTileAnimationStyleAppState extends State<ExpansionTileAnimationStyleApp> { Set<AnimationStyles> _animationStyleSelection = <AnimationStyles>{AnimationStyles.defaultStyle}; AnimationStyle? _animationStyle; @OverRide Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: SafeArea( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ SegmentedButton<AnimationStyles>( selected: _animationStyleSelection, onSelectionChanged: (Set<AnimationStyles> styles) { setState(() { _animationStyleSelection = styles; switch (styles.first) { case AnimationStyles.defaultStyle: _animationStyle = null; case AnimationStyles.custom: _animationStyle = AnimationStyle( curve: Easing.emphasizedAccelerate, duration: Durations.extralong1, ); case AnimationStyles.none: _animationStyle = AnimationStyle.noAnimation; } }); }, segments: animationStyleSegments .map<ButtonSegment<AnimationStyles>>(((AnimationStyles, String) shirt) { return ButtonSegment<AnimationStyles>(value: shirt.$1, label: Text(shirt.$2)); }) .toList(), ), const SizedBox(height: 20), ExpansionTile( expansionAnimationStyle: _animationStyle, title: const Text('ExpansionTile'), children: const <Widget>[ ListTile(title: Text('Expanded Item 1')), ListTile(title: Text('Expanded Item 2')), ], ) ], ), ), ), ); } } ``` </details> Related to #138721.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
a: animation
Animation APIs
autosubmit
Merge PR when tree becomes green via auto submit App
d: api docs
Issues with https://api.flutter.dev/
d: examples
Sample code and demos
f: material design
flutter/packages/flutter/material repository.
framework
flutter/packages/flutter repository. See also f: labels.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces
AnimationStyle, it is used to override default animation curves and durations in several widgets.fixes Add the ability to customize MaterialApp theme animation duration
fixes Allow customization of showMenu transition animation curves and duration
fixes
AnimationStyle.noAnimationneeds to replaceAnimatedThemewith justThemein theMaterialAppHere is an example where popup menu curve and transition duration is overridden:
Set
AnimationStyle.noAnimationto disable animation.Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.