|
|
@ -25,16 +25,9 @@ class CommentList extends StatefulWidget { |
|
|
|
final Function delCommentTips; |
|
|
|
final Function delCommentTips; |
|
|
|
final double fontSize; |
|
|
|
final double fontSize; |
|
|
|
|
|
|
|
|
|
|
|
CommentList( |
|
|
|
CommentList(Key key, this.arguments, this.activity, this.article, |
|
|
|
Key key, |
|
|
|
this.isKeyBoardShow, this.reply, this.delCommentTips, this.fontSize) |
|
|
|
this.arguments, |
|
|
|
: super(key: key); |
|
|
|
this.activity, |
|
|
|
|
|
|
|
this.article, |
|
|
|
|
|
|
|
this.isKeyBoardShow, |
|
|
|
|
|
|
|
this.reply, |
|
|
|
|
|
|
|
this.delCommentTips, |
|
|
|
|
|
|
|
this.fontSize |
|
|
|
|
|
|
|
) : super(key: key); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
State<StatefulWidget> createState() { |
|
|
|
State<StatefulWidget> createState() { |
|
|
@ -104,7 +97,7 @@ class _CommentList extends State<CommentList> { |
|
|
|
Text( |
|
|
|
Text( |
|
|
|
S.of(context).pinglun_(commentTotal.toString()), |
|
|
|
S.of(context).pinglun_(commentTotal.toString()), |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize:widget.fontSize+4, |
|
|
|
fontSize: widget.fontSize + 4, |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
color: Color(0xff1A1A1A), |
|
|
|
color: Color(0xff1A1A1A), |
|
|
|
), |
|
|
|
), |
|
|
@ -116,7 +109,7 @@ class _CommentList extends State<CommentList> { |
|
|
|
S.of(context).xihuan_( |
|
|
|
S.of(context).xihuan_( |
|
|
|
"${widget.article?.likes ?? widget.activity?.likes ?? "0"}"), |
|
|
|
"${widget.article?.likes ?? widget.activity?.likes ?? "0"}"), |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize:widget.fontSize+4, |
|
|
|
fontSize: widget.fontSize + 4, |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
color: Color(0xff1A1A1A), |
|
|
|
color: Color(0xff1A1A1A), |
|
|
|
), |
|
|
|
), |
|
|
@ -163,7 +156,7 @@ class _CommentList extends State<CommentList> { |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
S.of(context).yixiansquanbupinglun, |
|
|
|
S.of(context).yixiansquanbupinglun, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize:widget.fontSize+2, |
|
|
|
fontSize: widget.fontSize + 2, |
|
|
|
color: Color(0xff353535), |
|
|
|
color: Color(0xff353535), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
@ -171,17 +164,15 @@ class _CommentList extends State<CommentList> { |
|
|
|
if (memberList == null || memberList.length == 0) |
|
|
|
if (memberList == null || memberList.length == 0) |
|
|
|
Container( |
|
|
|
Container( |
|
|
|
width: double.infinity, |
|
|
|
width: double.infinity, |
|
|
|
height: MediaQuery.of(context).size.height - |
|
|
|
height: MediaQuery.of(context).size.height - kToolbarHeight |
|
|
|
kToolbarHeight - |
|
|
|
- MediaQuery.of(context).padding.top - 160.h, |
|
|
|
MediaQuery.of(context).padding.top - |
|
|
|
|
|
|
|
160.h, |
|
|
|
|
|
|
|
alignment: Alignment.topCenter, |
|
|
|
alignment: Alignment.topCenter, |
|
|
|
color: Color(0xFFF2F2F2), |
|
|
|
color: Color(0xFFF2F2F2), |
|
|
|
padding: EdgeInsets.only(top: 22.h), |
|
|
|
padding: EdgeInsets.only(top: 22.h), |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
S.of(context).zanwupinglun, |
|
|
|
S.of(context).zanwupinglun, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize:widget.fontSize+2, |
|
|
|
fontSize: widget.fontSize + 2, |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
color: Color(0xFFA0A0A0), |
|
|
|
color: Color(0xFFA0A0A0), |
|
|
|
), |
|
|
|
), |
|
|
@ -216,10 +207,12 @@ class _CommentList extends State<CommentList> { |
|
|
|
token: sharedPreferences.getString("token"), |
|
|
|
token: sharedPreferences.getString("token"), |
|
|
|
showLoading: false, |
|
|
|
showLoading: false, |
|
|
|
); |
|
|
|
); |
|
|
|
BaseData<PageInfo<MemberCommentList>> baseData = await apiService.memberCommentList({ |
|
|
|
BaseData<PageInfo<MemberCommentList>> baseData = |
|
|
|
|
|
|
|
await apiService.memberCommentList({ |
|
|
|
"pageNum": 1, |
|
|
|
"pageNum": 1, |
|
|
|
"pageSize": 100, |
|
|
|
"pageSize": 100, |
|
|
|
"relationalId": widget.arguments["activityId"] ?? widget.arguments["articleId"], |
|
|
|
"relationalId": |
|
|
|
|
|
|
|
widget.arguments["activityId"] ?? widget.arguments["articleId"], |
|
|
|
"relationalType": 1, |
|
|
|
"relationalType": 1, |
|
|
|
}).catchError((error) {}); |
|
|
|
}).catchError((error) {}); |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
@ -292,7 +285,7 @@ class _CommentList extends State<CommentList> { |
|
|
|
text: memberList.username, |
|
|
|
text: memberList.username, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
fontSize:widget.fontSize+2, |
|
|
|
fontSize: widget.fontSize + 2, |
|
|
|
color: Colors.black, |
|
|
|
color: Colors.black, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
@ -308,7 +301,7 @@ class _CommentList extends State<CommentList> { |
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
maxLines: 2, |
|
|
|
maxLines: 2, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize:widget.fontSize, |
|
|
|
fontSize: widget.fontSize, |
|
|
|
color: Color(0xff808080), |
|
|
|
color: Color(0xff808080), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
@ -359,7 +352,7 @@ class _CommentList extends State<CommentList> { |
|
|
|
text, |
|
|
|
text, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
color: Color(0xFF1A1A1A), |
|
|
|
color: Color(0xFF1A1A1A), |
|
|
|
fontSize:widget.fontSize, |
|
|
|
fontSize: widget.fontSize, |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -381,7 +374,7 @@ class _CommentList extends State<CommentList> { |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
memberList.content, |
|
|
|
memberList.content, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize:widget.fontSize+2, |
|
|
|
fontSize: widget.fontSize + 2, |
|
|
|
color: Color(0xff1A1A1A), |
|
|
|
color: Color(0xff1A1A1A), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
@ -415,7 +408,7 @@ class _CommentList extends State<CommentList> { |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
memberList.parentContent ?? "", |
|
|
|
memberList.parentContent ?? "", |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize:widget.fontSize, |
|
|
|
fontSize: widget.fontSize, |
|
|
|
color: Color(0xff808080), |
|
|
|
color: Color(0xff808080), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|