57 lines
1.5 KiB
Dart
57 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../../features/divination/data/models/divination_params.dart';
|
|
import '../../theme/design_tokens.dart';
|
|
|
|
class YaoGlyph extends StatelessWidget {
|
|
const YaoGlyph({super.key, required this.type, this.height = 6});
|
|
|
|
final YaoType type;
|
|
final double height;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final colors = Theme.of(context).colorScheme;
|
|
final lineColor = type == YaoType.undetermined
|
|
? colors.outline
|
|
: colors.primary;
|
|
final isYin = type == YaoType.youngYin || type == YaoType.oldYin;
|
|
if (!isYin) {
|
|
return Container(
|
|
key: const Key('yao_glyph_solid'),
|
|
height: height,
|
|
decoration: BoxDecoration(
|
|
color: lineColor,
|
|
borderRadius: BorderRadius.circular(height),
|
|
),
|
|
);
|
|
}
|
|
|
|
return Row(
|
|
children: [
|
|
Expanded(
|
|
child: Container(
|
|
key: const Key('yao_glyph_split_left'),
|
|
height: height,
|
|
decoration: BoxDecoration(
|
|
color: lineColor,
|
|
borderRadius: BorderRadius.circular(height),
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(width: AppSpacing.sm),
|
|
Expanded(
|
|
child: Container(
|
|
key: const Key('yao_glyph_split_right'),
|
|
height: height,
|
|
decoration: BoxDecoration(
|
|
color: lineColor,
|
|
borderRadius: BorderRadius.circular(height),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|