opt: enum

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-05 15:06:19 +08:00
parent 4e68c765c5
commit 2f4c739f0b
116 changed files with 577 additions and 554 deletions

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
enum ReplyType {
unset,
// 视频
video,
// 话题
topic,
//
unset2,
// 活动
activity,
// 小视频
videoS,
// 小黑屋封禁信息
blockMsg,
// 公告信息
publicMsg,
// 直播活动
liveActivity,
// 活动稿件
activityFile,
// 直播公告
livePublic,
// 相簿
album,
// 专栏
column,
// 票务
ticket,
// 音频
audio,
// 风纪委员会
unset3,
// 点评
comment,
// 动态
dynamics,
// 播单
playList,
// 音乐播单
musicPlayList,
// 漫画
comics1,
// 漫画
comics2,
// 漫画
comics3,
// 课程
course,
}