show meta info in task detail page

This commit is contained in:
2024-05-25 16:06:56 +08:00
parent afbda5a587
commit d2d4579de3
4 changed files with 66 additions and 5 deletions

View File

@@ -1,13 +1,16 @@
import 'package:flutter/material.dart';
class Rate extends StatelessWidget {
const Rate(this.rate, {super.key, this.fontSize});
const Rate(this.rate, {super.key, this.fontSize, this.selectable = false});
final double rate;
final double? fontSize;
final bool selectable;
@override
Widget build(BuildContext context) {
final cs = Theme.of(context).colorScheme;
final style = TextStyle(color: cs.secondary, fontSize: fontSize);
final t = " $rate";
return Row(
children: [
for (var i = 1; i < 6; i++)
@@ -20,8 +23,7 @@ class Rate extends StatelessWidget {
color: cs.primary,
size: fontSize,
),
Text(" $rate",
style: TextStyle(color: cs.secondary, fontSize: fontSize)),
selectable ? SelectableText(t, style: style) : Text(t, style: style),
],
);
}