|
@@ -1,4 +1,3 @@
|
1
|
|
-
|
2
|
1
|
import 'dart:async';
|
3
|
2
|
|
4
|
3
|
import 'package:farmer_client/utils/timer.dart';
|
|
@@ -20,26 +19,19 @@ Widget countdown(int sec, void Function() onFinish) {
|
20
|
19
|
}, 1000);
|
21
|
20
|
|
22
|
21
|
return Obx(
|
23
|
|
- () => GestureDetector(
|
24
|
|
- onTap: () {
|
25
|
|
- _timer.cancel();
|
26
|
|
- // return;
|
27
|
|
- // onFinish();
|
28
|
|
- },
|
29
|
|
- child: Container(
|
30
|
|
- width: 50.w,
|
31
|
|
- height: 30.h,
|
32
|
|
- alignment: const Alignment(0, 0),
|
33
|
|
- decoration: const BoxDecoration(
|
34
|
|
- borderRadius: BorderRadius.all(Radius.circular(20)),
|
35
|
|
- color: Color(0x77222222)),
|
36
|
|
- child: Text(
|
37
|
|
- _countdown.value.toString() + '跳过',
|
38
|
|
- style: TextStyle(
|
39
|
|
- fontSize: 13.sp,
|
40
|
|
- letterSpacing: 2,
|
41
|
|
- color: const Color(0xFFFFFFFF),
|
42
|
|
- ),
|
|
22
|
+ () => Container(
|
|
23
|
+ width: 20.h,
|
|
24
|
+ height: 20.h,
|
|
25
|
+ alignment: const Alignment(0, 0),
|
|
26
|
+ decoration: const BoxDecoration(
|
|
27
|
+ borderRadius: BorderRadius.all(Radius.circular(20)),
|
|
28
|
+ color: Color(0x77222222)),
|
|
29
|
+ child: Text(
|
|
30
|
+ _countdown.value.toString(),
|
|
31
|
+ style: TextStyle(
|
|
32
|
+ fontSize: 13.sp,
|
|
33
|
+ letterSpacing: 2,
|
|
34
|
+ color: const Color(0xFFFFFFFF),
|
43
|
35
|
),
|
44
|
36
|
),
|
45
|
37
|
),
|