feat: dyn reaction

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-06-19 21:23:54 +08:00
parent 16b38d1d3b
commit c4dd07ab0f
16 changed files with 710 additions and 198 deletions

View File

@@ -40,20 +40,18 @@ class _MatchInfoPageState extends CommonDynPageState<MatchInfoPage> {
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Scaffold(
final child = Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('比赛详情')),
body: ViewSafeArea(
child: refreshIndicator(
onRefresh: controller.onRefresh,
child: CustomScrollView(
controller: scrollController,
physics: const AlwaysScrollableScrollPhysics(),
slivers: [
Obx(() => _buildInfo(theme, controller.infoState.value)),
buildReplyHeader(theme),
Obx(() => replyList(theme, controller.loadingState.value)),
Obx(() => _buildInfo(controller.infoState.value)),
buildReplyHeader(),
Obx(() => replyList(controller.loadingState.value)),
],
),
),
@@ -64,9 +62,10 @@ class _MatchInfoPageState extends CommonDynPageState<MatchInfoPage> {
child: fabButton,
),
);
return fabAnimWrapper(child);
}
Widget _buildInfo(ThemeData theme, LoadingState<MatchContest?> infoState) {
Widget _buildInfo(LoadingState<MatchContest?> infoState) {
if (infoState case Success(:final response?)) {
try {
Widget teamInfo(MatchTeam team) {
@@ -188,12 +187,7 @@ class _MatchInfoPageState extends CommonDynPageState<MatchInfoPage> {
}
@override
void replyReply(
BuildContext context,
ReplyInfo replyItem,
int? id,
ThemeData theme,
) {
void replyReply(BuildContext context, ReplyInfo replyItem, int? id) {
EasyThrottle.throttle('replyReply', const Duration(milliseconds: 500), () {
int oid = replyItem.oid.toInt();
int rpid = replyItem.id.toInt();