Add a delay
argument to all implicitly animated widgets
#148628
Labels
a: animation
Animation APIs
c: new feature
Nothing broken; request for a new capability
c: proposal
A detailed proposal for a change to Flutter
framework
flutter/packages/flutter repository. See also f: labels.
P3
Issues that are less important to the Flutter project
team-framework
Owned by Framework team
triaged-framework
Triaged by Framework team
Use case
I have an implicitly animated widget where I want the transition animation to be delayed by a certain amount.
Here's a more specific/detailed example:
AnimatedSwitcher
(though you could also want this with any other implicitly animated widget) to animate in a new set of N elementsProposal
All implicitly animated widgets have an optional
Duration delay
named argument (AnimatedSwitcher
,AnimatedContainer
, etc).If a non zero delay is sepcified, then the transitions for that widget start after waiting for the specified delay.
Here is an example of the effect I want to achieve.
https://github.com/flutter/flutter/assets/10675231/f2051141-5151-4777-8214-abf317b87c6d
Here's a code sample for how I achieved it. Note how hacky and complex the logic was.
Here is what the code would look like with my proposal, note how much simpler the implementation is:
The text was updated successfully, but these errors were encountered: