mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-26 01:10:39 +00:00
Opacity
-> FadeTransition
This commit is contained in:
parent
a8f5f106a3
commit
a7e0cca687
2 changed files with 5 additions and 5 deletions
|
@ -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,
|
||||
),
|
||||
],
|
||||
|
|
|
@ -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,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue