docs: 更新协议文档,删除废弃计划文档
- 更新 http-error-codes, user-points-chat-data-protocol - 更新 divination-run-protocol, profile-protocol - 删除废弃的后端和前端设计计划文档
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import '../../../features/divination/data/models/divination_params.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
|
||||
abstract final class DivinationTerms {
|
||||
static const yaoNames = ['初爻', '二爻', '三爻', '四爻', '五爻', '上爻'];
|
||||
@@ -45,6 +46,32 @@ abstract final class DivinationTerms {
|
||||
static const yaoXiang = '爻象';
|
||||
static const qiGua = '起卦';
|
||||
static const jieGua = '解卦';
|
||||
|
||||
static String yaoName(AppLocalizations l10n, int index) {
|
||||
return switch (index) {
|
||||
0 => l10n.yaoNameFirst,
|
||||
1 => l10n.yaoNameSecond,
|
||||
2 => l10n.yaoNameThird,
|
||||
3 => l10n.yaoNameFourth,
|
||||
4 => l10n.yaoNameFifth,
|
||||
5 => l10n.yaoNameTop,
|
||||
_ => '',
|
||||
};
|
||||
}
|
||||
|
||||
static String yinYangLabel(AppLocalizations l10n, bool isYang) {
|
||||
return isYang ? l10n.yaoYang : l10n.yaoYin;
|
||||
}
|
||||
|
||||
static String yaoTypeLabel(AppLocalizations l10n, YaoType type) {
|
||||
return switch (type) {
|
||||
YaoType.youngYang => l10n.yaoYoungYang,
|
||||
YaoType.youngYin => l10n.yaoYoungYin,
|
||||
YaoType.oldYang => l10n.yaoOldYang,
|
||||
YaoType.oldYin => l10n.yaoOldYin,
|
||||
YaoType.undetermined => '',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
enum YaoTypeLabel { youngYang, youngYin, oldYang, oldYin }
|
||||
|
||||
Reference in New Issue
Block a user