Commit 16d37715b60779f7c8ee97b23e0fa66d692a7ff3

Authored by wdn127929
1 parent 85dbadd4

首页形象展示部分UI

import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/utils/dialog_util.dart';
import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/system_app_bar.dart';
import 'package:one_key/widgets/v_empty_view.dart';
... ... @@ -39,13 +42,13 @@ class _FirstImagePageState extends State<FirstImagePage> {
themeColorData.add(colorModel);
ThemeColorModel colorModel1 = ThemeColorModel();
colorModel.name = '孔雀蓝';
colorModel.color = MyColours.color_0143A3;
colorModel1.name = '孔雀蓝';
colorModel1.color = MyColours.color_0143A3;
themeColorData.add(colorModel1);
ThemeColorModel colorModel2 = ThemeColorModel();
colorModel.name = '群青绿';
colorModel.color = MyColours.color_438E93;
colorModel2.name = '群青绿';
colorModel2.color = MyColours.color_438E93;
themeColorData.add(colorModel2);
}
... ... @@ -105,7 +108,7 @@ class _FirstImagePageState extends State<FirstImagePage> {
children: [
_item('主题颜色选择', themeColorData[themeColorIndex].name,
onTap: () {
DialogUtil.showThemeColorSelectDialog(context,
DialogUtil.showThemeColorSelectDialog(context, themeColorData,
callback: (object) {
print(object);
setState(() {
... ... @@ -130,7 +133,22 @@ class _FirstImagePageState extends State<FirstImagePage> {
width: double.infinity,
height: w(165),
color: themeColorData[themeColorIndex].color,
)
child: Column(
children: [
Align(
alignment: Alignment.centerLeft,
child: Image.asset(
Utils.getImgPath('olive_${themeColorIndex}'),
height: w(69),
),
),
Container(
height: w(39),
child: Text('data'),
)
],
),
),
],
),
)),
... ...
... ... @@ -36,6 +36,8 @@ import 'package:table_calendar/table_calendar.dart';
import 'package:one_key/models/table.dart' as t;
import 'package:url_launcher/url_launcher.dart';
import '../models/theme_color_model.dart';
typedef CustomCallBack = void Function(Object object);
typedef CustomCallBackMap = void Function(Map<String, String> object);
... ... @@ -4641,7 +4643,7 @@ class DialogUtil {
}
//主题颜色选择弹框
static showThemeColorSelectDialog(BuildContext context,
static showThemeColorSelectDialog(BuildContext context, List<ThemeColorModel> themeColorData,
{CustomCallBack callback}) {
return showModalBottomSheet(
context: context,
... ... @@ -4669,13 +4671,13 @@ class DialogUtil {
child: Container(
width: double.infinity,
height: w(106),
color: MyColours.color_0C0F0E,
color:themeColorData[0].color,
margin: EdgeInsets.symmetric(horizontal: w(30)),
padding: EdgeInsets.only(left: w(10), top: w(13)),
child: Container(
width: w(61),
height: w(27),
child: Text('睿智黑',
child: Text(themeColorData[0].name,
style: TextStyle(
color: MyColours.color_ffffff,
fontWeight: FontWeight.bold,
... ... @@ -4687,7 +4689,7 @@ class DialogUtil {
callback(1);
},
child: Container(
color: MyColours.color_0143A3,
color: themeColorData[1].color,
width: double.infinity,
height: w(106),
margin: EdgeInsets.symmetric(horizontal: w(30)),
... ... @@ -4695,7 +4697,7 @@ class DialogUtil {
child: Container(
width: w(61),
height: w(27),
child: Text('孔雀蓝',
child: Text(themeColorData[1].name,
style: TextStyle(
color: MyColours.color_ffffff,
fontWeight: FontWeight.bold,
... ... @@ -4707,7 +4709,7 @@ class DialogUtil {
callback(2);
},
child: Container(
color: MyColours.color_438E93,
color: themeColorData[2].color,
width: double.infinity,
height: w(106),
margin: EdgeInsets.symmetric(horizontal: w(30)),
... ... @@ -4715,7 +4717,7 @@ class DialogUtil {
child: Container(
width: w(61),
height: w(27),
child: Text('群青绿',
child: Text(themeColorData[2].name,
style: TextStyle(
color: MyColours.color_ffffff,
fontWeight: FontWeight.bold,
... ...