diff --git a/app/lib/consts.dart b/app/lib/consts.dart index ff51be4528a85120a5f2ee56be5d90e0dc7772c1..d52c93a1f6e61e3206738ead1e54ab97824593a3 100644 --- a/app/lib/consts.dart +++ b/app/lib/consts.dart @@ -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; diff --git a/app/lib/widgets/main_layout.dart b/app/lib/widgets/main_layout.dart index 227e09df6ce2215b075998eb2ebfe6d2f72ace89..77c433ac7bde8a877e908cdd683896fbb8e7fd7c 100644 --- a/app/lib/widgets/main_layout.dart +++ b/app/lib/widgets/main_layout.dart @@ -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)), + ), + ), + ), + ), ], ), ),