Opacity -> FadeTransition

This commit is contained in:
Vadim 2023-08-12 15:34:31 +02:00
parent a8f5f106a3
commit a7e0cca687
2 changed files with 5 additions and 5 deletions

View file

@ -295,8 +295,8 @@ class _AnimatedSwitcher extends StatelessWidget {
alignment: Alignment.center,
children: [
// https://api.flutter.dev/flutter/widgets/Opacity-class.html#performance-considerations-for-opacity-animation
Opacity(
opacity: closedOpacityAnimation.value,
FadeTransition(
opacity: closedOpacityAnimation,
child: Transform.scale(
scale: sizeAnimation.value!.width / closedSize.width,
child: SizedBox(
@ -310,8 +310,8 @@ class _AnimatedSwitcher extends StatelessWidget {
/// which leads to the failed ListTile assertion (listTileWidget != leading.width).
/// So we show the picker only when it makes sense as it begins to be less opaque.
if (openedOpacityAnimation.value != 0)
Opacity(
opacity: openedOpacityAnimation.value,
FadeTransition(
opacity: openedOpacityAnimation,
child: openedChild,
),
],

View file

@ -18,7 +18,7 @@ Future<void> main() {
// Optionally, save the summary to disk by setting includeSummary
// to true
await summary.writeTimelineToFile(
'dialog_opening_timeline',
'dialog_opening_timeline(fade)',
pretty: true,
);
}