1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

Flutter 3.29 beta (#2571)

This commit is contained in:
Eric Windmill
2025-02-12 18:08:01 -05:00
committed by GitHub
parent d62c784789
commit 719fd72c38
685 changed files with 76244 additions and 53721 deletions

View File

@@ -30,10 +30,7 @@ class _FadeTransitionDemoState extends State<FadeTransitionDemo>
_curve = CurvedAnimation(parent: _controller, curve: Curves.easeIn);
_animation = Tween(
begin: 1.0,
end: 0.0,
).animate(_curve);
_animation = Tween(begin: 1.0, end: 0.0).animate(_curve);
}
@override
@@ -45,29 +42,25 @@ class _FadeTransitionDemoState extends State<FadeTransitionDemo>
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text(
'Fade Transition',
),
),
appBar: AppBar(title: const Text('Fade Transition')),
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
FadeTransition(
opacity: _animation,
child: const Icon(
Icons.star,
color: Colors.amber,
size: 300,
),
child: const Icon(Icons.star, color: Colors.amber, size: 300),
),
ElevatedButton(
child: const Text('animate'),
onPressed: () => setState(() {
_controller.animateTo(1.0).then<TickerFuture>(
(value) => _controller.animateBack(0.0));
}),
onPressed:
() => setState(() {
_controller
.animateTo(1.0)
.then<TickerFuture>(
(value) => _controller.animateBack(0.0),
);
}),
),
],
),