Skip to content
Snippets Groups Projects
Commit b951e4a1 authored by Sara Savanovic Djordjevic's avatar Sara Savanovic Djordjevic
Browse files

add: no connection icon

parent 3bbec019
No related branches found
No related tags found
2 merge requests!9Clhp map,!8Clhp map
......@@ -11,6 +11,7 @@ const int fetchInterval = 60; // Fetch marker data every n minutes
// Map variables
LatLng mapCenter = LatLng(60.7666, 10.8471);
DateTime ?lastUpdate; // Last time data was fetched from server
bool gServerConnection = false;
// Font variables
const textColor = Colors.white;
......
......@@ -259,6 +259,38 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
),
),
),
Positioned( // No wifi icon
top: 80,
right: 10,
child: GestureDetector(
onTapDown: (_) {
setState(() {
// Add functionality
});
},
onTapUp: (_) {
setState(() {
// Add functionality
});
},
onTapCancel: () {
setState(() {
// Add functionality
});
},
child: Visibility( // Show icon only when no server connection
visible: !gServerConnection,
child: Container(
padding: const EdgeInsets.all(8),
decoration: isTapped ? const BoxDecoration(
shape: BoxShape.circle,
color: Colors.blue,
) : null,
child: const Icon(Icons.perm_scan_wifi, color: Color(0xFF5B0000)),
),
),
),
),
],
),
),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment