|
|
@ -287,12 +287,14 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver { |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///删除评论的提示 |
|
|
|
_delCommentTips() { |
|
|
|
_delCommentTips() { |
|
|
|
SmartDialog.show(widget: Tips(() { |
|
|
|
SmartDialog.show(widget: Tips(() { |
|
|
|
delComment(); |
|
|
|
delComment(); |
|
|
|
})); |
|
|
|
})); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///删除评论 |
|
|
|
delComment() async { |
|
|
|
delComment() async { |
|
|
|
BaseData baseData = await apiService.delComment( |
|
|
|
BaseData baseData = await apiService.delComment( |
|
|
|
widget.arguments["activityId"] ?? widget.arguments["articleId"]); |
|
|
|
widget.arguments["activityId"] ?? widget.arguments["articleId"]); |
|
|
@ -301,23 +303,22 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///评论 回复 |
|
|
|
_reply(memberComment) { |
|
|
|
_reply(memberComment) { |
|
|
|
FocusScope.of(context).requestFocus(commentFocus); |
|
|
|
FocusScope.of(context).requestFocus(commentFocus); |
|
|
|
parenId = memberComment.id; |
|
|
|
parenId = memberComment.id; |
|
|
|
hintText = S.of(context).huifu_("${memberComment.username}"); |
|
|
|
hintText = S.of(context).huifu_("${memberComment.username}"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///滑动到评论列表 |
|
|
|
_toComment() { |
|
|
|
_toComment() { |
|
|
|
if (commentKey.currentContext == null) return; |
|
|
|
if (commentKey.currentContext == null) return; |
|
|
|
RenderBox firstRenderBox = commentKey.currentContext.findRenderObject(); |
|
|
|
RenderBox firstRenderBox = commentKey.currentContext.findRenderObject(); |
|
|
|
Offset first = firstRenderBox.localToGlobal(Offset.zero); |
|
|
|
Offset first = firstRenderBox.localToGlobal(Offset.zero); |
|
|
|
scrollController.animateTo( |
|
|
|
scrollController.animateTo(first.dy + scrollController.offset - |
|
|
|
first.dy + |
|
|
|
|
|
|
|
scrollController.offset - |
|
|
|
|
|
|
|
(kToolbarHeight + MediaQuery.of(context).padding.top), |
|
|
|
(kToolbarHeight + MediaQuery.of(context).padding.top), |
|
|
|
duration: Duration(milliseconds: 1000), |
|
|
|
duration: Duration(milliseconds: 1000), |
|
|
|
curve: Curves.easeIn); |
|
|
|
curve: Curves.easeIn); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|