From 8ff63215f49a4c0e939de731c30404a180c1b5d2 Mon Sep 17 00:00:00 2001 From: LXD312569496 <450468291@qq.com> Date: Wed, 9 Oct 2019 11:05:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BAconfiguration=E7=B1=BB?= =?UTF-8?q?=EF=BC=8C=E5=B0=86=E9=85=8D=E7=BD=AE=E7=9A=84=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=94=BE=E5=88=B0=E8=BF=99=E9=87=8C=20=E5=BC=95=E5=85=A5provid?= =?UTF-8?q?er=E7=8A=B6=E6=80=81=E7=AE=A1=E7=90=86,=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E6=B7=B1=E5=B1=82=E5=B5=8C=E5=A5=97=E4=BC=A0=E9=80=92=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=20=E5=91=A8=E8=A7=86=E5=9B=BE=E5=92=8C=E6=9C=88?= =?UTF-8?q?=E8=A7=86=E5=9B=BE=EF=BC=8C=E8=81=94=E5=8A=A8=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA=E7=B1=BBLogUtil?= =?UTF-8?q?=EF=BC=8C=E6=96=B9=E4=BE=BF=E6=9F=A5=E7=9C=8B=E8=B0=83=E8=AF=95?= =?UTF-8?q?=20=E5=A2=9E=E5=8A=A0example=E4=BE=8B=E5=AD=90=20=E6=80=A7?= =?UTF-8?q?=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/widget/week_view_pager.dart | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/widget/week_view_pager.dart b/lib/widget/week_view_pager.dart index 965f77e..5858098 100644 --- a/lib/widget/week_view_pager.dart +++ b/lib/widget/week_view_pager.dart @@ -49,13 +49,31 @@ class _WeekViewPagerState extends State { height: configuration.itemSize ?? MediaQuery.of(context).size.width / 7, child: PageView.builder( onPageChanged: (position) { + if (calendarProvider.expandStatus.value == true) { + return; + } + LogUtil.log( + TAG: this.runtimeType, + message: "WeekViewPager PageView onPageChanged:${position}"); // 周视图的变化 DateModel firstDayOfWeek = configuration.weekList[position]; int currentMonth = firstDayOfWeek.month; if (lastMonth != currentMonth) { + LogUtil.log( + TAG: this.runtimeType, + message: + "WeekViewPager PageView monthChange:currentMonth:${currentMonth}"); configuration.monthChange( firstDayOfWeek.year, firstDayOfWeek.month); lastMonth = currentMonth; + if (calendarProvider.lastClickDateModel == null || + calendarProvider.lastClickDateModel.month != currentMonth) { + DateModel temp = new DateModel(); + temp.year = firstDayOfWeek.year; + temp.month = firstDayOfWeek.month; + temp.day = firstDayOfWeek.day + 14; + calendarProvider.lastClickDateModel = temp; + } } // calendarProvider.lastClickDateModel = configuration.weekList[position] // ..day += 4;