Commit f6f47198 authored by 何碧荣's avatar 何碧荣

like页样式调整

parent ac731df2
......@@ -21,7 +21,7 @@ class FocusListItem 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,8 +49,8 @@ class FocusListItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: ScreenUtil().setWidth(10.0)),
padding: EdgeInsets.only(top: ScreenUtil().setHeight(10.0)),
margin: EdgeInsets.only(left: ScreenUtil.instance.setWidth(10.0)),
padding: EdgeInsets.only(top: ScreenUtil.instance.setHeight(10.0)),
child: myText('${item.username??""}', ALColors.Color666666, 13.0),
)
],
......
......@@ -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 FocusPage extends StatefulWidget {
final FocusModel _model;
......@@ -70,7 +70,7 @@ class _FocusState extends BasePage<FocusPage> {
textAlign: TextAlign.center,
style: TextStyle(
color: ALColors.Color999999,
fontSize: ScreenUtil().setSp(14.0),
fontSize: ScreenUtil.instance.setSp(14.0),
height: 1.07
),
);
......@@ -88,7 +88,7 @@ class _FocusState extends BasePage<FocusPage> {
),
Padding(
padding: EdgeInsets.only(
left: ScreenUtil().setWidth(6.0),
left: ScreenUtil.instance.setWidth(6.0),
top: height20,
bottom: height20
),
......@@ -103,7 +103,7 @@ class _FocusState extends BasePage<FocusPage> {
child: Container(
color: Color(0xFFF4F3F8),
padding: EdgeInsets.only(
left: ScreenUtil().setWidth(6.0),
left: ScreenUtil.instance.setWidth(6.0),
top: height20,
bottom: height20
),
......@@ -255,14 +255,14 @@ class _FocusState extends BasePage<FocusPage> {
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(
......
......@@ -21,7 +21,7 @@ class LikeListItem 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
......@@ -69,6 +69,7 @@ class LikeListItem extends StatelessWidget {
Widget listItemInfo() {
var commentInfo;
var commenTime;
var textTop ;
if(item.type != 2){
if(item.likeContent.type == 0){
commentInfo = '赞了你的回答';
......@@ -78,17 +79,23 @@ class LikeListItem extends StatelessWidget {
}
commenTime = MessageDate(item.time).diffTime();
}
if(item.content != null){
textTop = 11.0 ;
}
else{
textTop = 0.0 ;
}
return Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: ScreenUtil().setWidth(10.0)),
padding: EdgeInsets.only(top: ScreenUtil().setHeight(10.0)),
margin: EdgeInsets.only(left: ScreenUtil.instance.setWidth(10.0)),
padding: EdgeInsets.only(top: ScreenUtil.instance.setHeight(textTop)),
child: myText('${item.name??""}${item.content??""}${commentInfo??""}', ALColors.Color666666, 13.0),
),
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('${commenTime??""}', ALColors.Color999999, 10.0)
)
],
......@@ -98,9 +105,9 @@ class LikeListItem extends StatelessWidget {
Widget listItemButton() {
return Container(
padding: EdgeInsets.only(top: ScreenUtil().setHeight(5.0), left: ScreenUtil().setWidth(12.0)),
width: ScreenUtil().setWidth(54.0),
height: ScreenUtil().setHeight(29.0),
padding: EdgeInsets.only(top: ScreenUtil.instance.setHeight(5.0), left: ScreenUtil.instance.setWidth(12.0)),
width: ScreenUtil.instance.setWidth(54.0),
height: ScreenUtil.instance.setHeight(29.0),
child: OutlineButton(
padding: const EdgeInsets.only(left: 0.0, right: 0.0,),
borderSide: BorderSide(
......
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