Commit ac731df2 authored by 郑智刚's avatar 郑智刚

适配修改

parent 16c7ab29
......@@ -21,7 +21,7 @@ class AttentionListItem extends StatelessWidget {
maxLines: maxLines,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: ScreenUtil().setSp(size),
fontSize: ScreenUtil.instance.setSp(size),
color: color,
height: 1.38,
fontWeight: weight ? FontWeight.bold : FontWeight.normal
......@@ -49,15 +49,15 @@ class AttentionListItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: ScreenUtil().setWidth(10.0)),
margin: EdgeInsets.only(left: ScreenUtil.instance.setWidth(10.0)),
child: myText('${item.title}', ALColors.Color464646, 13.0, weight: true),
),
Padding(
padding: EdgeInsets.only(left: ScreenUtil().setWidth(10.0), top: ScreenUtil().setHeight(4.0)),
padding: EdgeInsets.only(left: ScreenUtil.instance.setWidth(10.0), top: ScreenUtil.instance.setHeight(4.0)),
child: myText('${item.content}', ALColors.Color666666, 13.0, maxLines: 2),
),
Padding(
padding: EdgeInsets.only(left: ScreenUtil().setWidth(10.0), top: ScreenUtil().setHeight(3.0)),
padding: EdgeInsets.only(left: ScreenUtil.instance.setWidth(10.0), top: ScreenUtil.instance.setHeight(3.0)),
child: myText(MessageDate(item.pushTime).diffTime(), ALColors.Color999999, 10.0)
)
],
......@@ -67,9 +67,9 @@ class AttentionListItem extends StatelessWidget {
Widget listItemButton() {
return Container(
padding: EdgeInsets.only(top: ScreenUtil().setHeight(5.0), left: ScreenUtil().setWidth(12.0)),
width: ScreenUtil().setWidth(66.0),
height: ScreenUtil().setHeight(34.0),
padding: EdgeInsets.only(top: ScreenUtil.instance.setHeight(5.0), left: ScreenUtil.instance.setWidth(12.0)),
width: ScreenUtil.instance.setWidth(66.0),
height: ScreenUtil.instance.setHeight(34.0),
child: OutlineButton(
padding: const EdgeInsets.only(left: 0.0, right: 0.0,),
borderSide: BorderSide(
......
......@@ -9,12 +9,12 @@ import 'package:gmalpha_flutter/commonModel/base/BasePage.dart';
import 'package:gmalpha_flutter/res/value/ALColors.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
double width15 = ScreenUtil().setWidth(15.0);
double width16 = ScreenUtil().setWidth(16.0);
double width10 = ScreenUtil().setWidth(10.0);
double height16 = ScreenUtil().setHeight(16.0);
double height10 = ScreenUtil().setHeight(10.0);
double height20 = ScreenUtil().setHeight(20.0);
double width15 = ScreenUtil.instance.setWidth(15.0);
double width16 = ScreenUtil.instance.setWidth(16.0);
double width10 = ScreenUtil.instance.setWidth(10.0);
double height16 = ScreenUtil.instance.setHeight(16.0);
double height10 = ScreenUtil.instance.setHeight(10.0);
double height20 = ScreenUtil.instance.setHeight(20.0);
class AttentionPage extends StatefulWidget {
final AttentionModel _model;
......@@ -68,7 +68,7 @@ class _AttentionPageState extends BasePage<AttentionPage> {
textAlign: TextAlign.center,
style: TextStyle(
color: ALColors.Color999999,
fontSize: ScreenUtil().setSp(14.0),
fontSize: ScreenUtil.instance.setSp(14.0),
height: 1.07
),
);
......@@ -86,7 +86,7 @@ class _AttentionPageState extends BasePage<AttentionPage> {
),
Padding(
padding: EdgeInsets.only(
left: ScreenUtil().setWidth(6.0),
left: ScreenUtil.instance.setWidth(6.0),
top: height20,
bottom: height20
),
......@@ -101,7 +101,7 @@ class _AttentionPageState extends BasePage<AttentionPage> {
child: Container(
color: Color(0xFFF4F3F8),
padding: EdgeInsets.only(
left: ScreenUtil().setWidth(6.0),
left: ScreenUtil.instance.setWidth(6.0),
top: height20,
bottom: height20
),
......@@ -251,14 +251,14 @@ class _AttentionPageState extends BasePage<AttentionPage> {
children: <Widget>[
Padding(
padding: EdgeInsets.only(
top: ScreenUtil().setHeight(5.0),
top: ScreenUtil.instance.setHeight(5.0),
left: width16,
right: width16,
bottom: ScreenUtil().setHeight(19.0)
bottom: ScreenUtil.instance.setHeight(19.0)
),
child: Text(
'通知',
style: TextStyle(fontSize: ScreenUtil().setSp(20.0), color: ALColors.Color323232),
style: TextStyle(fontSize: ScreenUtil.instance.setSp(20.0), color: ALColors.Color323232),
),
),
Container(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment