Skip to content

Commit f361cae

Browse files
committed
Enhance map widget with scrollable content and fade indicator; update legend items for clarity
1 parent 3d08ab2 commit f361cae

File tree

1 file changed

+49
-12
lines changed

1 file changed

+49
-12
lines changed

lib/widgets/map_widget.dart

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -739,14 +739,16 @@ class _MapWidgetState extends State<MapWidget> with TickerProviderStateMixin {
739739
),
740740
const Divider(height: 1),
741741

742-
// Scrollable content
742+
// Scrollable content with fade indicator
743743
Expanded(
744-
child: SingleChildScrollView(
745-
padding: const EdgeInsets.fromLTRB(20, 16, 20, 32),
746-
child: Column(
747-
crossAxisAlignment: CrossAxisAlignment.stretch,
748-
children: [
749-
// Map Markers section
744+
child: Stack(
745+
children: [
746+
SingleChildScrollView(
747+
padding: const EdgeInsets.fromLTRB(20, 16, 20, 32),
748+
child: Column(
749+
crossAxisAlignment: CrossAxisAlignment.stretch,
750+
children: [
751+
// Map Markers section
750752
Text(
751753
'Map Markers',
752754
style: TextStyle(
@@ -769,6 +771,12 @@ class _MapWidgetState extends State<MapWidget> with TickerProviderStateMixin {
769771
description: 'Location where you sent a ping and heard a repeater',
770772
),
771773
Divider(height: 1, color: Colors.grey.shade700),
774+
_buildLegendItem(
775+
color: Colors.red,
776+
label: 'TX',
777+
description: 'Location where you sent a ping but no repeater was heard',
778+
),
779+
Divider(height: 1, color: Colors.grey.shade700),
772780
_buildLegendItem(
773781
color: const Color(0xFF0EA5E9),
774782
label: 'RX',
@@ -783,8 +791,8 @@ class _MapWidgetState extends State<MapWidget> with TickerProviderStateMixin {
783791
Divider(height: 1, color: Colors.grey.shade700),
784792
_buildLegendItem(
785793
color: Colors.grey,
786-
label: 'NONE',
787-
description: 'No repeaters heard or no response to discovery request',
794+
label: 'DISC',
795+
description: 'Location where you sent a discovery request but no repeater responded',
788796
),
789797
],
790798
),
@@ -889,8 +897,37 @@ class _MapWidgetState extends State<MapWidget> with TickerProviderStateMixin {
889897
],
890898
),
891899
),
892-
],
893-
),
900+
],
901+
),
902+
),
903+
// Bottom fade gradient to indicate scrollable content
904+
Positioned(
905+
left: 0,
906+
right: 0,
907+
bottom: 0,
908+
child: IgnorePointer(
909+
child: Container(
910+
height: 40,
911+
decoration: BoxDecoration(
912+
gradient: LinearGradient(
913+
begin: Alignment.topCenter,
914+
end: Alignment.bottomCenter,
915+
colors: [
916+
Theme.of(context).colorScheme.surfaceContainerHighest.withValues(alpha: 0),
917+
Theme.of(context).colorScheme.surfaceContainerHighest,
918+
],
919+
),
920+
),
921+
alignment: Alignment.center,
922+
child: Icon(
923+
Icons.keyboard_arrow_down,
924+
color: Colors.grey.shade500,
925+
size: 20,
926+
),
927+
),
928+
),
929+
),
930+
],
894931
),
895932
),
896933
],
@@ -1066,7 +1103,7 @@ class _MapWidgetState extends State<MapWidget> with TickerProviderStateMixin {
10661103
onTap: () => _showTxPingDetails(ping),
10671104
child: Container(
10681105
decoration: BoxDecoration(
1069-
color: ping.heardRepeaters.isEmpty ? Colors.grey : Colors.green,
1106+
color: ping.heardRepeaters.isEmpty ? Colors.red : Colors.green,
10701107
shape: BoxShape.circle,
10711108
border: Border.all(color: Colors.white, width: 2),
10721109
boxShadow: [

0 commit comments

Comments
 (0)