improve gesture ui and matching

This commit is contained in:
Fabian Freund
2026-06-02 12:04:02 +02:00
parent 6108b24f21
commit 84ae5e71dd
22 changed files with 2759 additions and 3667 deletions
@@ -24,6 +24,7 @@ class InlineCountBadge extends StatelessWidget {
required this.count,
required this.backgroundColor,
required this.foregroundColor,
this.icon,
super.key,
});
@@ -31,6 +32,9 @@ class InlineCountBadge extends StatelessWidget {
final Color backgroundColor;
final Color foregroundColor;
/// Optional glyph rendered inside the badge, trailing the count.
final IconData? icon;
static String formatCount(int count) {
if (count >= 1000) {
final k = count / 1000;
@@ -49,13 +53,22 @@ class InlineCountBadge extends StatelessWidget {
color: backgroundColor,
borderRadius: BorderRadius.circular(10),
),
child: Text(
formatCount(count),
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.bold,
color: foregroundColor,
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
formatCount(count),
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.bold,
color: foregroundColor,
),
),
if (icon case final icon?) ...[
const SizedBox(width: 2),
Icon(icon, size: 12, color: foregroundColor),
],
],
),
);
}