From f41bb02bae23284a7b8c15a4b7b667ce4c46f1d3 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Fri, 8 Mar 2024 23:05:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=90=88=E9=9B=86=E6=9C=80=E5=90=8E?= =?UTF-8?q?=E4=B8=80p=E4=B8=8D=E6=98=BE=E7=A4=BA=20issues=20#620?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/bangumi/widgets/bangumi_panel.dart | 4 ++-- lib/pages/video/detail/introduction/widgets/season.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pages/bangumi/widgets/bangumi_panel.dart b/lib/pages/bangumi/widgets/bangumi_panel.dart index 05889f16a..20a153a04 100644 --- a/lib/pages/bangumi/widgets/bangumi_panel.dart +++ b/lib/pages/bangumi/widgets/bangumi_panel.dart @@ -144,9 +144,9 @@ class _BangumiPanelState extends State { Expanded( child: Material( child: ScrollablePositionedList.builder( - itemCount: widget.pages.length, + itemCount: widget.pages.length + 1, itemBuilder: (BuildContext context, int index) { - bool isLastItem = index == widget.pages.length - 1; + bool isLastItem = index == widget.pages.length; bool isCurrentIndex = currentIndex == index; return isLastItem ? SizedBox( diff --git a/lib/pages/video/detail/introduction/widgets/season.dart b/lib/pages/video/detail/introduction/widgets/season.dart index c6a943989..0f3884ede 100644 --- a/lib/pages/video/detail/introduction/widgets/season.dart +++ b/lib/pages/video/detail/introduction/widgets/season.dart @@ -161,9 +161,9 @@ class _SeasonPanelState extends State { Expanded( child: Material( child: ScrollablePositionedList.builder( - itemCount: episodes.length, + itemCount: episodes.length + 1, itemBuilder: (BuildContext context, int index) { - bool isLastItem = index == episodes.length - 1; + bool isLastItem = index == episodes.length; bool isCurrentIndex = currentIndex == index; return isLastItem ? SizedBox(