diff --git a/lib/pages/config/theme_colors.dart b/lib/pages/config/theme_colors.dart new file mode 100644 index 0000000..f38f2d3 --- /dev/null +++ b/lib/pages/config/theme_colors.dart @@ -0,0 +1,7 @@ +import 'dart:ui'; + +class ThemeColors{ + static const Color primary = Color(0xFFEB0E0E); + static const Color accent = Color(0x80EB0E0E); + static const Color transparent = Color(0x00000000); +} \ No newline at end of file diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 9a9e68c..67ff87a 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -1,5 +1,6 @@ import 'package:amap_flutter_map/amap_flutter_map.dart'; import 'package:autosos_flutter/const_config.dart'; +import 'package:autosos_flutter/pages/config/theme_colors.dart'; import 'package:autosos_flutter/pages/home/widgets/image_block.dart'; import 'package:autosos_flutter/pages/home/widgets/number_block.dart'; import 'package:flutter/material.dart'; @@ -40,7 +41,11 @@ class _HomePageState extends State { body: Padding( padding: const EdgeInsets.all(10), child: Column( - children: [buildTopWidget()], + children: [ + buildTopWidget(), + buildMiddleWidget(), + buildBottomWidget() + ], ), )); } @@ -76,7 +81,7 @@ class _HomePageState extends State { onChanged: (value) => setState(() { enabled = value; }), - activeColor: Colors.red, + activeColor: ThemeColors.primary, ), Container( margin: const EdgeInsets.only(left: 10, right: 10), @@ -115,4 +120,66 @@ class _HomePageState extends State { ), ); } + + Widget buildMiddleWidget() { + return Container( + margin: const EdgeInsets.only(top: 10), + padding: const EdgeInsets.all(20), + decoration: const BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(5))), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + const Text( + "非事故拖车", + style: TextStyle( + color: ThemeColors.primary, + fontSize: 19, + fontWeight: FontWeight.bold), + ), + Container( + height: 20, + margin: const EdgeInsets.only(left: 10), + decoration: BoxDecoration( + border: Border.all(color: Colors.grey, width: 1), + borderRadius: + const BorderRadius.all(Radius.circular(10))), + child: const Padding( + padding: EdgeInsets.all(3), + child: Text( + "最近订单", + style: TextStyle(fontSize: 8), + ), + )) + ], + ), + const Text("已完成") + ], + ), + const Divider(), + Row( + children: [ + Container( + margin: const EdgeInsets.only(right: 10), + child: Image.asset("images/3.0x/time_ic.png"), + ), + const Text( + "2024-01-23 16:36:03", + style: TextStyle(fontSize: 12, color: Color(0xFF9B9B9B)), + ), + ], + ) + ], + ), + ); + } + + Widget buildBottomWidget() { + return Container(); + } }