Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
浙江兰德纵横网络技术股份有限公司
o2oa-flutter
提交
ba6b3494
O
o2oa-flutter
项目概览
浙江兰德纵横网络技术股份有限公司
/
o2oa-flutter
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
o2oa-flutter
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
ba6b3494
编写于
4月 03, 2024
作者:
F
fancy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
部分主题颜色调整
上级
1dc8a2c8
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
83 addition
and
48 deletion
+83
-48
lib/common/models/enums/o2_skin.dart
lib/common/models/enums/o2_skin.dart
+16
-0
lib/common/style/color.dart
lib/common/style/color.dart
+25
-15
lib/common/style/theme.dart
lib/common/style/theme.dart
+18
-15
lib/pages/home/default_index/view.dart
lib/pages/home/default_index/view.dart
+23
-17
pubspec.yaml
pubspec.yaml
+1
-1
未找到文件。
lib/common/models/enums/o2_skin.dart
浏览文件 @
ba6b3494
...
...
@@ -36,6 +36,22 @@ extension O2SkinExtension on O2Skin {
}
}
Color
getSecondaryColor
()
{
switch
(
this
)
{
case
O2Skin
.
blue
:
return
AppColor
.
o2SkinBlueSecondary
;
case
O2Skin
.
red
:
return
AppColor
.
o2SkinRedSecondary
;
case
O2Skin
.
orange
:
return
AppColor
.
o2SkinOrangeSecondary
;
case
O2Skin
.
green
:
return
AppColor
.
o2SkinGreenSecondary
;
case
O2Skin
.
cyan
:
return
AppColor
.
o2SkinCyanSecondary
;
case
O2Skin
.
purple
:
return
AppColor
.
o2SkinPurpleSecondary
;
case
O2Skin
.
darkgreen
:
return
AppColor
.
o2SkinDarkGreenSecondary
;
case
O2Skin
.
tan
:
return
AppColor
.
o2SkinTanSecondary
;
case
O2Skin
.
navy
:
return
AppColor
.
o2SkinNavySecondary
;
case
O2Skin
.
gray
:
return
AppColor
.
o2SkinGraySecondary
;
default
:
return
AppColor
.
o2SkinBlueSecondary
;
}
}
String
get
displayName
{
switch
(
this
)
{
case
O2Skin
.
blue
:
return
'settings_skin_color_blue'
.
tr
;
...
...
lib/common/style/color.dart
浏览文件 @
ba6b3494
...
...
@@ -43,30 +43,40 @@ class AppColor {
/// o2 皮肤颜色
static
const
Color
o2SkinBlue
=
Color
(
0xFF4A90E2
);
static
const
Color
o2SkinBlueSecondary
=
Color
(
0xFF3e72c1
);
static
const
Color
o2SkinRed
=
Color
(
0xFFD94141
);
static
const
Color
o2SkinRedSecondary
=
Color
(
0xFFba3234
);
static
const
Color
o2SkinOrange
=
Color
(
0xFFED8824
);
static
const
Color
o2SkinOrangeSecondary
=
Color
(
0xFFdf6b1f
);
static
const
Color
o2SkinGreen
=
Color
(
0xFF60BF78
);
static
const
Color
o2SkinGreenSecondary
=
Color
(
0xFF3ba456
);
static
const
Color
o2SkinCyan
=
Color
(
0xFF30BFBF
);
static
const
Color
o2SkinCyanSecondary
=
Color
(
0xFF00a19e
);
static
const
Color
o2SkinPurple
=
Color
(
0xFFBF3995
);
static
const
Color
o2SkinPurpleSecondary
=
Color
(
0xFFa50080
);
static
const
Color
o2SkinDarkGreen
=
Color
(
0xFF4D6240
);
static
const
Color
o2SkinDarkGreenSecondary
=
Color
(
0xFF4D6240
);
static
const
Color
o2SkinTan
=
Color
(
0xFF995E2E
);
static
const
Color
o2SkinTanSecondary
=
Color
(
0xFF7d471f
);
static
const
Color
o2SkinNavy
=
Color
(
0xFF323159
);
static
const
Color
o2SkinNavySecondary
=
Color
(
0xFF323159
);
static
const
Color
o2SkinGray
=
Color
(
0xFF666666
);
static
MaterialColor
o2RedSwatch
=
MaterialColor
(
accentColor
.
value
,
const
<
int
,
Color
>{
50
:
accentColor
,
100
:
accentColor
,
200
:
accentColor
,
300
:
accentColor
,
400
:
accentColor
,
500
:
accentColor
,
600
:
accentColor
,
700
:
accentColor
,
800
:
accentColor
,
900
:
accentColor
,
},
);
static
const
Color
o2SkinGraySecondary
=
Color
(
0xFF252525
);
// static MaterialColor o2RedSwatch = MaterialColor(accentColor.value,
// const <int, Color>{
// 50: accentColor,
// 100: accentColor,
// 200: accentColor,
// 300: accentColor,
// 400: accentColor,
// 500: accentColor,
// 600: accentColor,
// 700: accentColor,
// 800: accentColor,
// 900: accentColor,
// },
// );
static
const
Color
scaffoldBackgroundColorLight
=
Color
(
0xFFEDEDED
);
static
const
Color
colorSchemeBackgroundLight
=
Color
(
0xFFF7F7F7
);
...
...
lib/common/style/theme.dart
浏览文件 @
ba6b3494
...
...
@@ -11,20 +11,20 @@ class AppTheme {
static
final
defaultLightTheme
=
ThemeData
(
scaffoldBackgroundColor:
AppColor
.
scaffoldBackgroundColorLight
,
primaryColor:
AppColor
.
primaryColor
,
primaryColor:
AppColor
.
o2SkinBlue
,
appBarTheme:
const
AppBarTheme
().
copyWith
(
centerTitle:
true
),
colorScheme:
const
ColorScheme
.
light
(
primary:
AppColor
.
primaryColor
,
secondary:
AppColor
.
accentColor
,
background:
AppColor
.
colorSchemeBackgroundLight
));
primary:
AppColor
.
o2SkinBlue
,
secondary:
AppColor
.
o2SkinBlueSecondary
,
background:
AppColor
.
colorSchemeBackgroundLight
));
static
final
defaultDarkTheme
=
ThemeData
(
appBarTheme:
const
AppBarTheme
().
copyWith
(
centerTitle:
true
),
bottomNavigationBarTheme:
const
BottomNavigationBarThemeData
().
copyWith
(
selectedLabelStyle:
const
TextStyle
(
fontSize:
14
,
color:
AppColor
.
primaryColor
),
selectedItemColor:
AppColor
.
primaryColor
,
),
//
bottomNavigationBarTheme: const BottomNavigationBarThemeData().copyWith(
//
selectedLabelStyle:
//
const TextStyle(fontSize: 14, color: AppColor.primaryColor),
//
selectedItemColor: AppColor.primaryColor,
//
),
colorScheme:
const
ColorScheme
.
dark
(
primary:
AppColor
.
primaryColor
,
secondary:
AppColor
.
accentColorDark
));
primary:
AppColor
.
o2SkinBlue
,
secondary:
AppColor
.
o2SkinBlueSecondary
));
static
TextStyle
whitePrimaryTextStyle
=
...
...
@@ -39,26 +39,29 @@ class AppTheme {
/// 根据皮肤颜色 获取亮色主题对象
static
ThemeData
getLightThemeBySkin
(
O2Skin
skin
)
{
final
skinColor
=
skin
.
getColor
();
final
secondary
=
skin
.
getSecondaryColor
();
return
ThemeData
(
scaffoldBackgroundColor:
AppColor
.
scaffoldBackgroundColorLight
,
primaryColor:
skinColor
,
appBarTheme:
const
AppBarTheme
().
copyWith
(
centerTitle:
true
),
colorScheme:
ColorScheme
.
light
(
primary:
skinColor
,
secondary:
AppColor
.
accentColor
,
background:
AppColor
.
colorSchemeBackgroundLight
));
primary:
skinColor
,
secondary:
secondary
,
background:
AppColor
.
colorSchemeBackgroundLight
),
);
}
/// 根据皮肤颜色 获取暗黑主题对象
static
ThemeData
getDarkThemeBySkin
(
O2Skin
skin
)
{
final
skinColor
=
skin
.
getColor
();
final
secondary
=
skin
.
getSecondaryColor
();
return
ThemeData
(
appBarTheme:
const
AppBarTheme
().
copyWith
(
centerTitle:
true
),
bottomNavigationBarTheme:
const
BottomNavigationBarThemeData
().
copyWith
(
selectedLabelStyle:
TextStyle
(
fontSize:
14
,
color:
skinColor
),
selectedItemColor:
skinColor
,
),
//
bottomNavigationBarTheme: const BottomNavigationBarThemeData().copyWith(
//
selectedLabelStyle:
//
TextStyle(fontSize: 14, color: skinColor),
//
selectedItemColor: skinColor,
//
),
colorScheme:
ColorScheme
.
dark
(
primary:
skinColor
,
secondary:
AppColor
.
accentColorDark
));
primary:
skinColor
,
secondary:
secondary
));
}
static
TextStyle
?
textBodyLarge
(
BuildContext
context
)
{
...
...
lib/pages/home/default_index/view.dart
浏览文件 @
ba6b3494
...
...
@@ -21,7 +21,7 @@ class DefaultIndexPage extends GetView<DefaultIndexController> {
children:
[
// 滚动大图和应用快捷列表
const
BannerAndAppsWidget
(),
const
SizedBox
(
height:
8
),
const
SizedBox
(
height:
8
),
_cmsAndTaskTabView
(
context
),
const
SizedBox
(
height:
10
),
controller
.
state
.
listType
==
1
...
...
@@ -30,47 +30,53 @@ class DefaultIndexPage extends GetView<DefaultIndexController> {
],
)));
}
/// Tab 信息中心 办公中心
/// Tab 信息中心 办公中心
Widget
_cmsAndTaskTabView
(
BuildContext
context
)
{
return
Obx
(()
=>
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
GestureDetector
(
onTap:
()
=>
controller
.
clickChangeListType
(
0
),
onTap:
()
=>
controller
.
clickChangeListType
(
0
),
child:
Padding
(
padding:
const
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
5
,
bottom:
5
),
child:
Text
(
'home_index_cms_center'
.
tr
,
style:
TextStyle
(
color:
controller
.
state
.
listType
==
0
?
Theme
.
of
(
context
).
colorScheme
.
primary
:
Theme
.
of
(
context
).
colorScheme
.
secondary
,
fontSize:
18
.
sp
,
fontWeight:
FontWeight
.
bold
),
style:
controller
.
state
.
listType
==
0
?
TextStyle
(
color:
Theme
.
of
(
context
).
colorScheme
.
primary
,
fontSize:
18
.
sp
,
fontWeight:
FontWeight
.
bold
)
:
TextStyle
(
color:
null
,
fontSize:
18
.
sp
,
fontWeight:
FontWeight
.
normal
),
)),
),
const
SizedBox
(
width:
15
),
GestureDetector
(
onTap:
()
=>
controller
.
clickChangeListType
(
1
),
onTap:
()
=>
controller
.
clickChangeListType
(
1
),
child:
Padding
(
padding:
const
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
5
,
bottom:
5
),
child:
Text
(
'home_index_task_center'
.
tr
,
style:
TextStyle
(
color:
controller
.
state
.
listType
==
1
?
Theme
.
of
(
context
).
colorScheme
.
primary
:
Theme
.
of
(
context
).
colorScheme
.
secondary
,
fontSize:
18
.
sp
,
fontWeight:
FontWeight
.
bold
),
style:
controller
.
state
.
listType
==
1
?
TextStyle
(
color:
Theme
.
of
(
context
).
colorScheme
.
primary
,
fontSize:
18
.
sp
,
fontWeight:
FontWeight
.
bold
)
:
TextStyle
(
color:
null
,
fontSize:
18
.
sp
,
fontWeight:
FontWeight
.
normal
),
)),
)
],
));
}
@override
Widget
build
(
BuildContext
context
)
{
return
GetBuilder
<
DefaultIndexController
>(
...
...
pubspec.yaml
浏览文件 @
ba6b3494
...
...
@@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version
:
8.3.
5+335
version
:
8.3.
6+336
environment
:
sdk
:
"
>=3.0.0
<
4.0.0"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录