Commit 16d37715b60779f7c8ee97b23e0fa66d692a7ff3

Authored by wdn127929
1 parent 85dbadd4

首页形象展示部分UI

  1 +import 'dart:ui';
  2 +
1 import 'package:flutter/material.dart'; 3 import 'package:flutter/material.dart';
2 import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 import 'package:flutter_screenutil/flutter_screenutil.dart';
3 import 'package:one_key/utils/dialog_util.dart'; 5 import 'package:one_key/utils/dialog_util.dart';
  6 +import 'package:one_key/utils/utils.dart';
4 import 'package:one_key/widgets/system_app_bar.dart'; 7 import 'package:one_key/widgets/system_app_bar.dart';
5 import 'package:one_key/widgets/v_empty_view.dart'; 8 import 'package:one_key/widgets/v_empty_view.dart';
6 9
@@ -39,13 +42,13 @@ class _FirstImagePageState extends State<FirstImagePage> { @@ -39,13 +42,13 @@ class _FirstImagePageState extends State<FirstImagePage> {
39 themeColorData.add(colorModel); 42 themeColorData.add(colorModel);
40 43
41 ThemeColorModel colorModel1 = ThemeColorModel(); 44 ThemeColorModel colorModel1 = ThemeColorModel();
42 - colorModel.name = '孔雀蓝';  
43 - colorModel.color = MyColours.color_0143A3; 45 + colorModel1.name = '孔雀蓝';
  46 + colorModel1.color = MyColours.color_0143A3;
44 themeColorData.add(colorModel1); 47 themeColorData.add(colorModel1);
45 48
46 ThemeColorModel colorModel2 = ThemeColorModel(); 49 ThemeColorModel colorModel2 = ThemeColorModel();
47 - colorModel.name = '群青绿';  
48 - colorModel.color = MyColours.color_438E93; 50 + colorModel2.name = '群青绿';
  51 + colorModel2.color = MyColours.color_438E93;
49 themeColorData.add(colorModel2); 52 themeColorData.add(colorModel2);
50 } 53 }
51 54
@@ -105,7 +108,7 @@ class _FirstImagePageState extends State<FirstImagePage> { @@ -105,7 +108,7 @@ class _FirstImagePageState extends State<FirstImagePage> {
105 children: [ 108 children: [
106 _item('主题颜色选择', themeColorData[themeColorIndex].name, 109 _item('主题颜色选择', themeColorData[themeColorIndex].name,
107 onTap: () { 110 onTap: () {
108 - DialogUtil.showThemeColorSelectDialog(context, 111 + DialogUtil.showThemeColorSelectDialog(context, themeColorData,
109 callback: (object) { 112 callback: (object) {
110 print(object); 113 print(object);
111 setState(() { 114 setState(() {
@@ -130,7 +133,22 @@ class _FirstImagePageState extends State<FirstImagePage> { @@ -130,7 +133,22 @@ class _FirstImagePageState extends State<FirstImagePage> {
130 width: double.infinity, 133 width: double.infinity,
131 height: w(165), 134 height: w(165),
132 color: themeColorData[themeColorIndex].color, 135 color: themeColorData[themeColorIndex].color,
133 - ) 136 + child: Column(
  137 + children: [
  138 + Align(
  139 + alignment: Alignment.centerLeft,
  140 + child: Image.asset(
  141 + Utils.getImgPath('olive_${themeColorIndex}'),
  142 + height: w(69),
  143 + ),
  144 + ),
  145 + Container(
  146 + height: w(39),
  147 + child: Text('data'),
  148 + )
  149 + ],
  150 + ),
  151 + ),
134 ], 152 ],
135 ), 153 ),
136 )), 154 )),
@@ -36,6 +36,8 @@ import 'package:table_calendar/table_calendar.dart'; @@ -36,6 +36,8 @@ import 'package:table_calendar/table_calendar.dart';
36 import 'package:one_key/models/table.dart' as t; 36 import 'package:one_key/models/table.dart' as t;
37 import 'package:url_launcher/url_launcher.dart'; 37 import 'package:url_launcher/url_launcher.dart';
38 38
  39 +import '../models/theme_color_model.dart';
  40 +
39 typedef CustomCallBack = void Function(Object object); 41 typedef CustomCallBack = void Function(Object object);
40 typedef CustomCallBackMap = void Function(Map<String, String> object); 42 typedef CustomCallBackMap = void Function(Map<String, String> object);
41 43
@@ -4641,7 +4643,7 @@ class DialogUtil { @@ -4641,7 +4643,7 @@ class DialogUtil {
4641 } 4643 }
4642 4644
4643 //主题颜色选择弹框 4645 //主题颜色选择弹框
4644 - static showThemeColorSelectDialog(BuildContext context, 4646 + static showThemeColorSelectDialog(BuildContext context, List<ThemeColorModel> themeColorData,
4645 {CustomCallBack callback}) { 4647 {CustomCallBack callback}) {
4646 return showModalBottomSheet( 4648 return showModalBottomSheet(
4647 context: context, 4649 context: context,
@@ -4669,13 +4671,13 @@ class DialogUtil { @@ -4669,13 +4671,13 @@ class DialogUtil {
4669 child: Container( 4671 child: Container(
4670 width: double.infinity, 4672 width: double.infinity,
4671 height: w(106), 4673 height: w(106),
4672 - color: MyColours.color_0C0F0E, 4674 + color:themeColorData[0].color,
4673 margin: EdgeInsets.symmetric(horizontal: w(30)), 4675 margin: EdgeInsets.symmetric(horizontal: w(30)),
4674 padding: EdgeInsets.only(left: w(10), top: w(13)), 4676 padding: EdgeInsets.only(left: w(10), top: w(13)),
4675 child: Container( 4677 child: Container(
4676 width: w(61), 4678 width: w(61),
4677 height: w(27), 4679 height: w(27),
4678 - child: Text('睿智黑', 4680 + child: Text(themeColorData[0].name,
4679 style: TextStyle( 4681 style: TextStyle(
4680 color: MyColours.color_ffffff, 4682 color: MyColours.color_ffffff,
4681 fontWeight: FontWeight.bold, 4683 fontWeight: FontWeight.bold,
@@ -4687,7 +4689,7 @@ class DialogUtil { @@ -4687,7 +4689,7 @@ class DialogUtil {
4687 callback(1); 4689 callback(1);
4688 }, 4690 },
4689 child: Container( 4691 child: Container(
4690 - color: MyColours.color_0143A3, 4692 + color: themeColorData[1].color,
4691 width: double.infinity, 4693 width: double.infinity,
4692 height: w(106), 4694 height: w(106),
4693 margin: EdgeInsets.symmetric(horizontal: w(30)), 4695 margin: EdgeInsets.symmetric(horizontal: w(30)),
@@ -4695,7 +4697,7 @@ class DialogUtil { @@ -4695,7 +4697,7 @@ class DialogUtil {
4695 child: Container( 4697 child: Container(
4696 width: w(61), 4698 width: w(61),
4697 height: w(27), 4699 height: w(27),
4698 - child: Text('孔雀蓝', 4700 + child: Text(themeColorData[1].name,
4699 style: TextStyle( 4701 style: TextStyle(
4700 color: MyColours.color_ffffff, 4702 color: MyColours.color_ffffff,
4701 fontWeight: FontWeight.bold, 4703 fontWeight: FontWeight.bold,
@@ -4707,7 +4709,7 @@ class DialogUtil { @@ -4707,7 +4709,7 @@ class DialogUtil {
4707 callback(2); 4709 callback(2);
4708 }, 4710 },
4709 child: Container( 4711 child: Container(
4710 - color: MyColours.color_438E93, 4712 + color: themeColorData[2].color,
4711 width: double.infinity, 4713 width: double.infinity,
4712 height: w(106), 4714 height: w(106),
4713 margin: EdgeInsets.symmetric(horizontal: w(30)), 4715 margin: EdgeInsets.symmetric(horizontal: w(30)),
@@ -4715,7 +4717,7 @@ class DialogUtil { @@ -4715,7 +4717,7 @@ class DialogUtil {
4715 child: Container( 4717 child: Container(
4716 width: w(61), 4718 width: w(61),
4717 height: w(27), 4719 height: w(27),
4718 - child: Text('群青绿', 4720 + child: Text(themeColorData[2].name,
4719 style: TextStyle( 4721 style: TextStyle(
4720 color: MyColours.color_ffffff, 4722 color: MyColours.color_ffffff,
4721 fontWeight: FontWeight.bold, 4723 fontWeight: FontWeight.bold,