李志伟 3 年之前
父節點
當前提交
e66b1b980f
共有 3 個檔案被更改,包括 16 行新增21 行删除
  1. 1
    0
      lib/pages/login/login.dart
  2. 2
    0
      lib/pages/splash/splash.dart
  3. 13
    21
      lib/pages/splash/widgets/countdown.dart

+ 1
- 0
lib/pages/login/login.dart 查看文件

@@ -14,6 +14,7 @@ import '../home/index.dart';
14 14
 
15 15
 
16 16
 class MyRouteLogin extends StatefulWidget {
17
+
17 18
   @override
18 19
   State<MyRouteLogin> createState() => _RouteLogin();
19 20
 }

+ 2
- 0
lib/pages/splash/splash.dart 查看文件

@@ -14,6 +14,8 @@ class SplashScreen extends StatefulWidget {
14 14
 
15 15
 class _SplashScreen extends State<SplashScreen> {
16 16
   handleOnFinish() {
17
+    print(99999);
18
+
17 19
     Get.off(Home());
18 20
     // Get.toNamed("/addressList");
19 21
   }

+ 13
- 21
lib/pages/splash/widgets/countdown.dart 查看文件

@@ -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
     ),