- Extract reusable widgets (chat composer/send pipeline, message bubble frame, reaction chips, path map scaffold, radio settings dialog, translation settings section, map POI clusters, nav tiles, etc.) and slim down the screens that used them - Map: hide/remove markers with restore, confirm before setting node location, POI clustering, semantics labels - Map cache: cancellable downloads and a bulk tile limit - Repeater: unsaved-changes guard, CLI search/copy/share transcript, framed-command debug preview, disconnected banner - Confirm before clearing chats and debug logs - Keep cached unread totals in sync on per-contact/channel updates - Move remaining hardcoded strings into l10n and translate the 98 new keys into all 17 non-English locales
32 lines
825 B
Dart
32 lines
825 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../theme/mesh_theme.dart';
|
|
|
|
class UnreadBadge extends StatelessWidget {
|
|
final int count;
|
|
|
|
const UnreadBadge({super.key, required this.count});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final display = count > 9999 ? '9999+' : count.toString();
|
|
return Container(
|
|
constraints: const BoxConstraints(minWidth: 20),
|
|
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
|
|
alignment: Alignment.center,
|
|
decoration: BoxDecoration(
|
|
color: MeshPalette.alert,
|
|
borderRadius: BorderRadius.circular(MeshRadii.pill),
|
|
),
|
|
child: Text(
|
|
display,
|
|
style: MeshTheme.mono(
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.w700,
|
|
color: Colors.white,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|