Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-06-21 12:46:34 +08:00
parent 5f3f158932
commit 604d78ad6a
161 changed files with 4873 additions and 4770 deletions

View File

@@ -1,10 +1,14 @@
import 'package:flutter/material.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
enum ReplyOptionType { allow, close, choose }
enum ReplyOptionType {
allow('允许评论'),
close('关闭评论'),
choose('精选评论'),
;
extension ReplyOptionTypeExt on ReplyOptionType {
String get title => const ['允许评论', '关闭评论', '精选评论'][index];
final String title;
const ReplyOptionType(this.title);
IconData get iconData => switch (this) {
ReplyOptionType.allow => MdiIcons.commentTextOutline,

View File

@@ -1,6 +1,8 @@
enum ReplySortType { time, like }
enum ReplySortType {
time('最新评论', '最新'),
hot('最热评论', '最热');
extension ReplySortTypeExt on ReplySortType {
String get title => const ['最新评论', '最热评论'][index];
String get label => const ['最新', '最热'][index];
final String title;
final String label;
const ReplySortType(this.title, this.label);
}