fix some deprecations

This commit is contained in:
Fabian Freund
2025-08-24 08:03:31 +02:00
parent 8a7ab7640a
commit 320ad1de5f
3 changed files with 43 additions and 26 deletions
@@ -224,6 +224,7 @@ class _AnimateGradientShaderState extends State<AnimateGradientShader>
_controller =
(widget.controller ??
AnimationController(vsync: this, duration: widget.duration))
// ignore: discarded_futures
..repeat(reverse: widget.reverse);
_animation = CurvedAnimation(parent: _controller!, curve: Curves.easeInOut);
@@ -17,6 +17,8 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
@@ -160,17 +162,17 @@ class _AnimatedIndexedStackState extends State<AnimatedIndexedStack>
_moveToEnd(entries, entry);
switch (direction) {
case _ChildAnimationDirection.primaryForward:
entry.primaryController.forward(from: 0);
unawaited(entry.primaryController.forward(from: 0));
entry.secondaryController.value = 0;
case _ChildAnimationDirection.primaryReverse:
entry.primaryController.reverse(from: 1);
unawaited(entry.primaryController.reverse(from: 1));
entry.secondaryController.value = 0;
case _ChildAnimationDirection.secondaryForward:
entry.primaryController.value = 1;
entry.secondaryController.forward(from: 0);
unawaited(entry.secondaryController.forward(from: 0));
case _ChildAnimationDirection.secondaryReverse:
entry.primaryController.value = 1;
entry.secondaryController.reverse(from: 1);
unawaited(entry.secondaryController.reverse(from: 1));
}
}