mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 15:30:59 +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,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
// https://api.flutter.dev/flutter/widgets/Opacity-class.html#performance-considerations-for-opacity-animation
|
// https://api.flutter.dev/flutter/widgets/Opacity-class.html#performance-considerations-for-opacity-animation
|
||||||
Opacity(
|
FadeTransition(
|
||||||
opacity: closedOpacityAnimation.value,
|
opacity: closedOpacityAnimation,
|
||||||
child: Transform.scale(
|
child: Transform.scale(
|
||||||
scale: sizeAnimation.value!.width / closedSize.width,
|
scale: sizeAnimation.value!.width / closedSize.width,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
|
@ -310,8 +310,8 @@ class _AnimatedSwitcher extends StatelessWidget {
|
||||||
/// which leads to the failed ListTile assertion (listTileWidget != leading.width).
|
/// 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.
|
/// So we show the picker only when it makes sense as it begins to be less opaque.
|
||||||
if (openedOpacityAnimation.value != 0)
|
if (openedOpacityAnimation.value != 0)
|
||||||
Opacity(
|
FadeTransition(
|
||||||
opacity: openedOpacityAnimation.value,
|
opacity: openedOpacityAnimation,
|
||||||
child: openedChild,
|
child: openedChild,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -18,7 +18,7 @@ Future<void> main() {
|
||||||
// Optionally, save the summary to disk by setting includeSummary
|
// Optionally, save the summary to disk by setting includeSummary
|
||||||
// to true
|
// to true
|
||||||
await summary.writeTimelineToFile(
|
await summary.writeTimelineToFile(
|
||||||
'dialog_opening_timeline',
|
'dialog_opening_timeline(fade)',
|
||||||
pretty: true,
|
pretty: true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue