Commit ea830701 authored by 杜欣's avatar 杜欣

样式修改

parent af056532
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:gmalpha_flutter/NewMessageModel/NewMessageRouter.dart'; import 'package:gmalpha_flutter/NewMessageModel/NewMessageRouter.dart';
import 'package:gmalpha_flutter/NewMessageModel/page/MessagePage.dart';
import 'package:gmalpha_flutter/NewMessageModel/page/AttentionPage.dart'; import 'package:gmalpha_flutter/NewMessageModel/page/AttentionPage.dart';
import 'package:gmalpha_flutter/NewMessageModel/page/focusPage/FocusPage.dart'; import 'package:gmalpha_flutter/NewMessageModel/page/focusPage/FocusPage.dart';
import 'package:gmalpha_flutter/NewMessageModel/page/likePage/LikePage.dart'; import 'package:gmalpha_flutter/NewMessageModel/page/likePage/LikePage.dart';
import 'package:gmalpha_flutter/NewMessageModel/page/messagePage/MessagePage.dart';
class NewMessageRouterImpl implements NewMessageRouter { class NewMessageRouterImpl implements NewMessageRouter {
@override @override
......
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:gmalpha_flutter/NewMessageModel/page/MessageModel.dart'; import 'package:gmalpha_flutter/NewMessageModel/page/messagePage/MessageModel.dart';
import 'package:gmalpha_flutter/NewMessageModel/page/common.dart'; import 'package:gmalpha_flutter/NewMessageModel/page/messagePage/common.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/LatestMessageEntity.dart'; import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/LatestMessageEntity.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/MyMessageEntity.dart'; import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/MyMessageEntity.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/UnreadMessageEntity.dart'; import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/UnreadMessageEntity.dart';
...@@ -86,13 +86,13 @@ class _MessagePageState extends BasePage<MessagePage> { ...@@ -86,13 +86,13 @@ class _MessagePageState extends BasePage<MessagePage> {
valueColor: AlwaysStoppedAnimation(ALColors.Color999999), valueColor: AlwaysStoppedAnimation(ALColors.Color999999),
strokeWidth: 2 strokeWidth: 2
), ),
width: ScreenUtil().setWidth(16), width: ScreenUtil.instance.setWidth(16),
height: ScreenUtil().setHeight(16) height: ScreenUtil.instance.setHeight(16)
) )
); );
return _pad( return _pad(
Row( Row(
children: <Widget>[loadingIndicator, _pad(Text(body, style: loadingTS), l: ScreenUtil().setWidth(10))], children: <Widget>[loadingIndicator, _pad(Text(body, style: loadingTS), l: ScreenUtil.instance.setWidth(10))],
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
), ),
...@@ -201,14 +201,14 @@ class _MessagePageState extends BasePage<MessagePage> { ...@@ -201,14 +201,14 @@ class _MessagePageState extends BasePage<MessagePage> {
}, },
), ),
Container( Container(
margin: EdgeInsets.only(left: ScreenUtil().setWidth(16), right: ScreenUtil().setWidth(16), bottom: ScreenUtil().setHeight(24)), margin: EdgeInsets.only(left: ScreenUtil.instance.setWidth(16), right: ScreenUtil.instance.setWidth(16), bottom: ScreenUtil().setHeight(24)),
height: ScreenUtil().setHeight(12), height: ScreenUtil.instance.setHeight(12),
decoration: BoxDecoration( decoration: BoxDecoration(
color: ALColors.ColorFFFFFF, color: ALColors.ColorFFFFFF,
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
color: Color(0xfffE4E4E4), color: Color(0xfffE4E4E4),
width: ScreenUtil().setWidth(1), width: ScreenUtil.instance.setWidth(1),
style: BorderStyle.solid style: BorderStyle.solid
) )
) )
......
...@@ -13,7 +13,7 @@ messageTitle(String text) { ...@@ -13,7 +13,7 @@ messageTitle(String text) {
color: ALColors.Color323232, fontSize: ScreenUtil().setSp(20))); color: ALColors.Color323232, fontSize: ScreenUtil().setSp(20)));
} }
var width = ScreenUtil().setWidth(16); var width = ScreenUtil.instance.setWidth(16);
Widget messageTop(imgUrl, title, content, count) { Widget messageTop(imgUrl, title, content, count) {
var height = ScreenUtil().setHeight(12); var height = ScreenUtil().setHeight(12);
...@@ -23,9 +23,9 @@ Widget messageTop(imgUrl, title, content, count) { ...@@ -23,9 +23,9 @@ Widget messageTop(imgUrl, title, content, count) {
child: Stack( child: Stack(
children: <Widget>[ children: <Widget>[
Container( Container(
padding: EdgeInsets.only(left: ScreenUtil().setWidth(28)), padding: EdgeInsets.only(left: ScreenUtil.instance.setWidth(28)),
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: ScreenUtil().setWidth(4), top: height, bottom: height), left: ScreenUtil.instance.setWidth(4), top: height, bottom: height),
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
color: ALColors.ColorFFFFFF, color: ALColors.ColorFFFFFF,
...@@ -40,10 +40,10 @@ Widget messageTop(imgUrl, title, content, count) { ...@@ -40,10 +40,10 @@ Widget messageTop(imgUrl, title, content, count) {
fontSize: ScreenUtil().setSp(13), fontSize: ScreenUtil().setSp(13),
fontWeight: FontWeight.bold)), fontWeight: FontWeight.bold)),
SizedBox( SizedBox(
width: ScreenUtil().setWidth(16), width: ScreenUtil.instance.setWidth(16),
), ),
Container( Container(
width: ScreenUtil().setWidth(200), width: ScreenUtil.instance.setWidth(200),
child: Text(content, child: Text(content,
style: TextStyle( style: TextStyle(
color: ALColors.Color8E8E8E, color: ALColors.Color8E8E8E,
...@@ -55,8 +55,8 @@ Widget messageTop(imgUrl, title, content, count) { ...@@ -55,8 +55,8 @@ Widget messageTop(imgUrl, title, content, count) {
), ),
getNum(count), getNum(count),
Positioned( Positioned(
right: ScreenUtil().setWidth(14), right: ScreenUtil.instance.setWidth(14),
top: ScreenUtil().setHeight(12), top: ScreenUtil.instance.setHeight(12),
child: Hero( child: Hero(
tag: "arrow_right", tag: "arrow_right",
child: SvgPicture.asset( child: SvgPicture.asset(
...@@ -71,14 +71,14 @@ Widget messageTop(imgUrl, title, content, count) { ...@@ -71,14 +71,14 @@ Widget messageTop(imgUrl, title, content, count) {
Widget getNum([int count]) { Widget getNum([int count]) {
if (count > 0) { if (count > 0) {
return Positioned( return Positioned(
right: 0, right: ScreenUtil.instance.setWidth(30),
top: ScreenUtil().setHeight(12), top: ScreenUtil.instance.setHeight(12),
child: Container( child: Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: ScreenUtil().setHeight(2), top: ScreenUtil.instance.setHeight(2),
bottom: ScreenUtil().setHeight(2), bottom: ScreenUtil.instance.setHeight(2),
left: ScreenUtil().setWidth(7), left: ScreenUtil.instance.setWidth(7),
right: ScreenUtil().setWidth(7)), right: ScreenUtil.instance.setWidth(7)),
decoration: BoxDecoration( decoration: BoxDecoration(
color: ALColors.Color323232, color: ALColors.Color323232,
borderRadius: BorderRadius.circular(22.0)), borderRadius: BorderRadius.circular(22.0)),
...@@ -125,7 +125,7 @@ Widget messageList(Data list) { ...@@ -125,7 +125,7 @@ Widget messageList(Data list) {
}; };
return Container( return Container(
padding: EdgeInsets.only(left: width, right: width), padding: EdgeInsets.only(left: width, right: width),
margin: EdgeInsets.only(bottom: ScreenUtil().setHeight(25)), margin: EdgeInsets.only(bottom: ScreenUtil.instance.setHeight(25)),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
...@@ -149,7 +149,7 @@ Widget messageList(Data list) { ...@@ -149,7 +149,7 @@ Widget messageList(Data list) {
shape: BoxShape.circle, shape: BoxShape.circle,
image: DecorationImage( image: DecorationImage(
image: NetworkImage(list.icon))))), image: NetworkImage(list.icon))))),
SizedBox(width: ScreenUtil().setWidth(10)), SizedBox(width: ScreenUtil.instance.setWidth(10)),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
onClickButton('comment'); onClickButton('comment');
...@@ -174,7 +174,7 @@ Widget messageList(Data list) { ...@@ -174,7 +174,7 @@ Widget messageList(Data list) {
color: ALColors.Color323232, color: ALColors.Color323232,
fontSize: ScreenUtil().setSp(13), fontSize: ScreenUtil().setSp(13),
fontWeight: FontWeight.bold)), fontWeight: FontWeight.bold)),
SizedBox(width: ScreenUtil().setWidth(10)), SizedBox(width: ScreenUtil.instance.setWidth(10)),
Text( Text(
content[list.repliedContent?.type] content[list.repliedContent?.type]
['showText'], ['showText'],
...@@ -184,7 +184,7 @@ Widget messageList(Data list) { ...@@ -184,7 +184,7 @@ Widget messageList(Data list) {
], ],
), ),
Container( Container(
width: ScreenUtil().setWidth(210), width: ScreenUtil.instance.setWidth(210),
child: Text(list.content, child: Text(list.content,
style: TextStyle( style: TextStyle(
color: ALColors.Color323232, color: ALColors.Color323232,
...@@ -210,7 +210,7 @@ Widget messageList(Data list) { ...@@ -210,7 +210,7 @@ Widget messageList(Data list) {
}, },
child: Image.network( child: Image.network(
list.repliedContent.content, list.repliedContent.content,
width: ScreenUtil().setWidth(48), width: ScreenUtil.instance.setWidth(48),
fit: BoxFit.fill, fit: BoxFit.fill,
)) ))
], ],
......
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