mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 12:10:33 +08:00
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user