From 1a50b8bc270ba9f7e071ad7a239d4d04698a7506 Mon Sep 17 00:00:00 2001 From: nyne Date: Mon, 2 Dec 2024 17:45:26 +0800 Subject: [PATCH] fix TabBar --- lib/components/appbar.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/components/appbar.dart b/lib/components/appbar.dart index c5341f1..0550e60 100644 --- a/lib/components/appbar.dart +++ b/lib/components/appbar.dart @@ -332,7 +332,7 @@ class _FilledTabBarState extends State { @override Widget build(BuildContext context) { return AnimatedBuilder( - animation: _controller, + animation: _controller.animation ?? _controller, builder: buildTabBar, ); } @@ -427,7 +427,7 @@ class _FilledTabBarState extends State { padding: const EdgeInsets.symmetric(horizontal: 16), child: DefaultTextStyle( style: DefaultTextStyle.of(context).style.copyWith( - color: i == _controller.index + color: i == _controller.animation?.value.round() ? context.colorScheme.primary : context.colorScheme.onSurface, fontWeight: FontWeight.w500,