Skip to content

Commit f792023

Browse files
committedJul 4, 2019
style: add link widget.
1 parent 5df4add commit f792023

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed
 

‎lib/widget/moment_item_widget.dart

+24-1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,27 @@ class MomentItemWidget extends StatelessWidget {
8282
child: Text('${moment.from}', style: TextStyle(color: Colors.grey[500], fontSize: 13),),
8383
) : Container();
8484

85+
// 链接
86+
Widget _linkWidget = moment.linkModal != null ?
87+
Container(
88+
color: Color(AppColors.BackgroundColor),
89+
padding: EdgeInsets.all(5.0),
90+
margin: EdgeInsets.only(top: 10.0, right: 10.0),
91+
child: Row(
92+
crossAxisAlignment: CrossAxisAlignment.center,
93+
children: <Widget>[
94+
Image.asset(
95+
'assets/images/moments_bg.png',
96+
width: 50.0,
97+
height: 50.0,
98+
),
99+
SizedBox(width: 10.0,),
100+
Expanded(
101+
child: Text('测试链接,测试中。。。', maxLines: 1, style: TextStyle(fontSize: 16.0,),),
102+
),
103+
],
104+
),
105+
) : Container();
85106

86107
return Container(
87108
padding: EdgeInsets.all(10.0),
@@ -115,7 +136,7 @@ class MomentItemWidget extends StatelessWidget {
115136
crossAxisAlignment: CrossAxisAlignment.start,
116137
children: <Widget>[
117138
// 昵称
118-
Text('${moment.nickname}', style: TextStyle(color: Color(0xff576b95), fontSize: 16.0, fontWeight: FontWeight.bold),),
139+
Text('${moment.nickname}', style: TextStyle(color: Color(0xff576b95), fontSize: 20.0, fontWeight: FontWeight.bold),),
119140

120141
// 文字部分
121142
Offstage(
@@ -133,6 +154,8 @@ class MomentItemWidget extends StatelessWidget {
133154
_imagesGrid,
134155
// 视频
135156
_videoWidget,
157+
// 链接
158+
_linkWidget,
136159

137160
// 定位地址
138161
Container(

0 commit comments

Comments
 (0)