Update: 2026-06-24 16:19:03

This commit is contained in:
Hamza-Ayed
2026-06-24 16:19:04 +03:00
parent 2e4bf784ec
commit 3fcc6e76fd

View File

@@ -64,6 +64,7 @@ class _SnackContent extends StatefulWidget {
class _SnackContentState extends State<_SnackContent>
with TickerProviderStateMixin {
late final AnimationController _ctrl;
late final AnimationController _scaleCtrl;
late final Animation<double> _scaleAnim;
late final Animation<double> _progressAnim;
@@ -74,11 +75,13 @@ class _SnackContentState extends State<_SnackContent>
super.initState();
_ctrl = AnimationController(vsync: this, duration: _displayDuration);
_scaleAnim = CurvedAnimation(
parent: AnimationController(
_scaleCtrl = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 500),
)..forward(),
);
_scaleAnim = CurvedAnimation(
parent: _scaleCtrl,
curve: Curves.elasticOut,
);
@@ -86,12 +89,14 @@ class _SnackContentState extends State<_SnackContent>
CurvedAnimation(parent: _ctrl, curve: Curves.linear),
);
_scaleCtrl.forward();
_ctrl.forward();
}
@override
void dispose() {
_ctrl.dispose();
_scaleCtrl.dispose();
super.dispose();
}