From 4c7cde7ae5ed57335405459e47de4bbd2726c4ba Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 07 五月 2022 19:43:39 +0800 Subject: [PATCH] 功能完善 --- flutter_module/lib/ui/task.dart | 37 +++++++++++++++++++++---------------- 1 files changed, 21 insertions(+), 16 deletions(-) diff --git a/flutter_module/lib/ui/task.dart b/flutter_module/lib/ui/task.dart index 888f940..520297c 100644 --- a/flutter_module/lib/ui/task.dart +++ b/flutter_module/lib/ui/task.dart @@ -63,20 +63,21 @@ fToast!.init(context); //鍒濆鍖� - _signInfo = SigninInfoModel( - continueSignInDay: 0, - isSignIned: true, - notify: true, - dayList: [ - DayList(day: "-", goldCorn: 0, state: 2, today: false), - DayList(day: "-", goldCorn: 0, state: 2, today: false), - DayList(day: "-", goldCorn: 0, state: 2, today: false), - DayList(day: "-", goldCorn: 0, state: 2, today: false), - DayList(day: "-", goldCorn: 0, state: 2, today: false), - DayList(day: "-", goldCorn: 0, state: 2, today: false), - DayList(day: "-", goldCorn: 0, state: 2, today: false), - ]); - + setState(() { + _signInfo = SigninInfoModel( + continueSignInDay: 0, + isSignIned: true, + notify: true, + dayList: [ + DayList(day: "-", goldCorn: 0, state: 2, today: false), + DayList(day: "-", goldCorn: 0, state: 2, today: false), + DayList(day: "-", goldCorn: 0, state: 2, today: false), + DayList(day: "-", goldCorn: 0, state: 2, today: false), + DayList(day: "-", goldCorn: 0, state: 2, today: false), + DayList(day: "-", goldCorn: 0, state: 2, today: false), + DayList(day: "-", goldCorn: 0, state: 2, today: false), + ]); + }); _getSignInfo(); _getNotify(); _getTaskList(1); @@ -322,7 +323,7 @@ }, child: Padding( padding: const EdgeInsets.only( - top: 5, bottom: 3), + top: 5, bottom: 2), child: Image.asset( _notify ? "assets/imgs/task/icon_task_sign_notify_checked.png" @@ -499,7 +500,11 @@ double? _sizeUnit; Widget getSignDayItem(DayList day) { - _sizeUnit ??= (MediaQuery.of(context).size.width) / 375; + if (_sizeUnit == null || _sizeUnit == 0) { + setState(() { + _sizeUnit = (MediaQuery.of(context).size.width) / 375; + }); + } print("$_sizeUnit"); return Expanded( child: Column( -- Gitblit v1.8.0