feat: 实现起卦、设置与积分系统

This commit is contained in:
qzl
2026-04-03 16:56:47 +08:00
parent 31594558eb
commit f245eec5f6
170 changed files with 20728 additions and 328 deletions
@@ -0,0 +1,67 @@
import 'package:flutter/material.dart';
import '../../../features/divination/data/models/divination_params.dart';
import '../../theme/design_tokens.dart';
import 'divination_terms.dart';
import 'yao_glyph.dart';
class YaoLineRow extends StatelessWidget {
const YaoLineRow({
super.key,
required this.name,
required this.type,
this.showChangeMark = true,
this.showName = true,
this.onTap,
this.enabled = true,
this.lineHeight = 6,
});
final String name;
final YaoType type;
final bool showChangeMark;
final bool showName;
final VoidCallback? onTap;
final bool enabled;
final double lineHeight;
@override
Widget build(BuildContext context) {
final mark = showChangeMark ? _changeMark(type) : '';
return InkWell(
onTap: enabled ? onTap : null,
borderRadius: BorderRadius.circular(AppRadius.sm),
child: SizedBox(
height: 38,
child: Row(
children: [
SizedBox(
width: 48,
child: Text(showName ? name : '', textAlign: TextAlign.center),
),
const SizedBox(width: AppSpacing.sm),
Expanded(
child: YaoGlyph(type: type, height: lineHeight),
),
SizedBox(
width: 20,
child: Text(
mark,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
fontWeight: FontWeight.w700,
color: Theme.of(context).colorScheme.primary,
),
),
),
],
),
),
);
}
String _changeMark(YaoType type) {
return type.changeMark;
}
}