Skip to content

Commit f246267

Browse files
committed
增加主题切换支持
1 parent 30478be commit f246267

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎lib/common/utils/CommonUtils.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ class CommonUtils {
230230
maxLines: 2,
231231
mainAxisAlignment: MainAxisAlignment.start,
232232
fontSize: 14.0,
233-
color: Color(GSYColors.primaryValue),
233+
color: Theme.of(context).primaryColor,
234234
text: commitMaps[index],
235235
textColor: Color(GSYColors.white),
236236
onPress: () {

‎lib/page/LoginPage.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class _LoginPageState extends State<LoginPage> {
5858
FocusScope.of(context).requestFocus(new FocusNode());
5959
},
6060
child: new Container(
61-
color: Color(GSYColors.primaryValue),
61+
color: Theme.of(context).primaryColor,
6262
child: new Center(
6363
child: new Card(
6464
elevation: 5.0,
@@ -94,7 +94,7 @@ class _LoginPageState extends State<LoginPage> {
9494
new Padding(padding: new EdgeInsets.all(30.0)),
9595
new GSYFlexButton(
9696
text: GSYStrings.login_text,
97-
color: Color(GSYColors.primaryValue),
97+
color: Theme.of(context).primaryColor,
9898
textColor: Color(GSYColors.textWhite),
9999
onPress: () {
100100
if (_userName == null || _userName.length == 0) {

‎lib/widget/GSYSearchDrawer.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class _GSYSearchDrawerState extends State<GSYSearchDrawer> {
3333
@override
3434
Widget build(BuildContext context) {
3535
return new Container(
36-
color: Color(GSYColors.primaryValue),
36+
color: Theme.of(context).primaryColor,
3737
padding: EdgeInsets.only(top: CommonUtils.sStaticBarHeight),
3838
child: Container(
3939
color: Color(GSYColors.white),
@@ -75,7 +75,7 @@ class _GSYSearchDrawerState extends State<GSYSearchDrawer> {
7575

7676
_renderTitle(String title) {
7777
return new Container(
78-
color: Color(GSYColors.primaryValue),
78+
color: Theme.of(context).primaryColor,
7979
width: itemWidth + 50,
8080
height: 50.0,
8181
child: new Center(

‎lib/widget/PushHeader.dart‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class PushHeader extends StatelessWidget {
2222
return new GSYIConText(
2323
icon,
2424
text,
25-
GSYConstant.smallSubText,
26-
Color(GSYColors.subTextColor),
25+
GSYConstant.smallSubLightText,
26+
Color(GSYColors.subLightTextColor),
2727
15.0,
2828
padding: 0.0,
2929
);
@@ -32,7 +32,7 @@ class PushHeader extends StatelessWidget {
3232
@override
3333
Widget build(BuildContext context) {
3434
return new GSYCardItem(
35-
color: Color(GSYColors.primaryValue),
35+
color: Theme.of(context).primaryColor,
3636
child: new FlatButton(
3737
padding: new EdgeInsets.all(0.0),
3838
onPressed: () {},

0 commit comments

Comments
 (0)