mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-14 22:55:12 +10:00
51d6210920
- Introduced `mesh_ui.dart` with reusable widgets including SectionHeader, MeshCard, StatusChip, StatTile, AvatarCircle, SignalBars, RouteChip, PulseDot, BottomSheetHeader, ErrorRetryCard, and ListEntrance. - Implemented `path_map_ui.dart` for path map screens, featuring path distance calculations, playback controls, and a summary list of observed paths. - Created `themed_map_tile_layer.dart` for shared cached map tiles with automatic dark-mode treatment.
31 lines
839 B
Dart
31 lines
839 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(
|
|
padding: const EdgeInsets.symmetric(horizontal: 7, vertical: 2),
|
|
decoration: BoxDecoration(
|
|
color: MeshPalette.blue.withValues(alpha: 0.18),
|
|
borderRadius: BorderRadius.circular(MeshRadii.pill),
|
|
border: Border.all(color: MeshPalette.blue.withValues(alpha: 0.45)),
|
|
),
|
|
child: Text(
|
|
display,
|
|
style: MeshTheme.mono(
|
|
fontSize: 11,
|
|
fontWeight: FontWeight.w700,
|
|
color: MeshPalette.blue,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|