|
|
|
@ -27,6 +27,7 @@ class _ClockInOutMainPageState extends State<ClockInOutMainPage>
|
|
|
|
|
Timer? _clockSetState;
|
|
|
|
|
DateTime? _lastPressed;
|
|
|
|
|
TodayClockRecordModel? _model;
|
|
|
|
|
|
|
|
|
|
bool get canTap {
|
|
|
|
|
if (_lastPressed == null ||
|
|
|
|
|
DateTime.now().difference(_lastPressed!) > Duration(seconds: 15)) {
|
|
|
|
@ -81,7 +82,9 @@ class _ClockInOutMainPageState extends State<ClockInOutMainPage>
|
|
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
child: _model == null
|
|
|
|
|
? Container()
|
|
|
|
|
: Container(
|
|
|
|
|
margin: EdgeInsets.all(32.w),
|
|
|
|
|
padding: EdgeInsets.all(32.w),
|
|
|
|
|
width: double.infinity,
|
|
|
|
@ -93,7 +96,8 @@ class _ClockInOutMainPageState extends State<ClockInOutMainPage>
|
|
|
|
|
.color(kTextPrimaryColor)
|
|
|
|
|
.make(),
|
|
|
|
|
16.w.heightBox,
|
|
|
|
|
WeekDaysToChinese.fromString(DateUtil.getWeekday(DateTime.now()))
|
|
|
|
|
WeekDaysToChinese.fromString(
|
|
|
|
|
DateUtil.getWeekday(DateTime.now()))
|
|
|
|
|
.text
|
|
|
|
|
.size(24.sp)
|
|
|
|
|
.color(kTextPrimaryColor)
|
|
|
|
@ -114,7 +118,12 @@ class _ClockInOutMainPageState extends State<ClockInOutMainPage>
|
|
|
|
|
_buildClock(),
|
|
|
|
|
65.w.heightBox,
|
|
|
|
|
'今日工时'.text.size(24.sp).bold.color(kTextSubColor).make(),
|
|
|
|
|
'共$getWorkHours'.text.size(24.sp).bold.color(kTextSubColor).make(),
|
|
|
|
|
'共$getWorkHours'
|
|
|
|
|
.text
|
|
|
|
|
.size(24.sp)
|
|
|
|
|
.bold
|
|
|
|
|
.color(kTextSubColor)
|
|
|
|
|
.make(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|