This commit is contained in:
2026-03-07 17:24:59 +08:00
parent 4418ebecac
commit b0ec8ab4bd
417 changed files with 42546 additions and 2 deletions

View File

@@ -0,0 +1,52 @@
import 'package:flutter/material.dart';
import 'package:flutter_dmzj/app/app_style.dart';
import 'package:flutter_dmzj/modules/common/comment/comment_list_view.dart';
import 'package:flutter_dmzj/routes/app_navigator.dart';
import 'package:get/get.dart';
class CommentPage extends StatelessWidget {
final int objId;
final int type;
const CommentPage({required this.objId, required this.type, Key? key})
: super(key: key);
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 2,
child: Scaffold(
appBar: AppBar(
title: Container(
alignment: Alignment.center,
child: TabBar(
isScrollable: true,
labelPadding: AppStyle.edgeInsetsH24,
tabAlignment: TabAlignment.start,
indicatorSize: TabBarIndicatorSize.label,
indicatorColor: Theme.of(context).colorScheme.primary,
labelColor: Theme.of(context).colorScheme.primary,
unselectedLabelColor:
Get.isDarkMode ? Colors.white70 : Colors.black87,
tabs: const [
Tab(text: "最新评论"),
Tab(text: "热门评论"),
],
),
),
),
body: TabBarView(
children: [
CommentListView(objId: objId, type: type, isHot: false),
CommentListView(objId: objId, type: type, isHot: true),
],
),
floatingActionButton: FloatingActionButton(
onPressed: () {
AppNavigator.toAddComment(objId: objId, type: type);
},
child: const Icon(Icons.add),
),
),
);
}
}