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 f91a8aa913
commit 7126d05063
16 changed files with 706 additions and 199 deletions

View File

@@ -38,8 +38,7 @@ class _MatchInfoPageState extends CommonDynPageState<MatchInfoPage> {
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return scaffold(
final child = scaffold(
appBar: AppBar(title: const Text('比赛详情')),
body: Stack(
clipBehavior: .none,
@@ -48,12 +47,11 @@ class _MatchInfoPageState extends CommonDynPageState<MatchInfoPage> {
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)),
],
),
),
@@ -75,9 +73,10 @@ class _MatchInfoPageState extends CommonDynPageState<MatchInfoPage> {
],
),
);
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) {
@@ -199,12 +198,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();