mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-26 05:26:37 +10:00
Add shared UI components for mesh application
- 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.
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
import '../l10n/l10n.dart';
|
||||
import '../theme/mesh_theme.dart';
|
||||
|
||||
class MessageStatusIcon extends StatefulWidget {
|
||||
final bool isAcked;
|
||||
@@ -71,7 +72,11 @@ class _MessageStatusIconState extends State<MessageStatusIcon>
|
||||
if (widget.isFailed) {
|
||||
return Semantics(
|
||||
label: l10n.messageStatus_failed,
|
||||
child: Icon(Icons.cancel, size: size, color: colorScheme.error),
|
||||
child: Icon(
|
||||
Icons.cancel,
|
||||
size: size,
|
||||
color: colorScheme.error,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -92,7 +97,10 @@ class _MessageStatusIconState extends State<MessageStatusIcon>
|
||||
: widget.isAcked
|
||||
? l10n.messageStatus_delivered
|
||||
: l10n.messageStatus_sent;
|
||||
final Color color = delivered ? colorScheme.tertiary : baseColor;
|
||||
// Use palette colors: tertiary (warn/amber) for acked/repeated, base for sent.
|
||||
final Color color = delivered
|
||||
? MeshPalette.signal.withValues(alpha: 0.9)
|
||||
: baseColor;
|
||||
|
||||
return Semantics(
|
||||
label: label,
|
||||
|
||||
Reference in New Issue
Block a user