diff --git a/app/lib/pages/consts.dart b/app/lib/pages/consts.dart index dcf0e5a44fe3c2965a773d3c6a35d993e0888b21..4ff9e12303eae072fb1f3d87d746405b16b40f66 100644 --- a/app/lib/pages/consts.dart +++ b/app/lib/pages/consts.dart @@ -5,7 +5,7 @@ import 'package:google_fonts/google_fonts.dart'; const String port = "8443"; const String serverURI = "https://127.0.0.1:$port/"; const String mapEndpoint = "update_map"; -const int fetchInterval = 5; +const int fetchInterval = 60; // Fetch marker data every n minutes // Font variables const textColor = Colors.white; @@ -19,7 +19,7 @@ final titleStyle = GoogleFonts.dmSans( color: textColor, fontWeight: FontWeight.bold, // Add this line to make the text bold ); -final textStyle = GoogleFonts.dmSans(fontSize: 20, color: textColor); +final regTextStyle = GoogleFonts.dmSans(fontSize: 20, color: textColor); final chartTextStyle = GoogleFonts.dmSans(fontSize: 14, color: textColor); // Colors diff --git a/app/lib/pages/default_page.dart b/app/lib/pages/default_page.dart index 51167e84b160bb61b0de3acdd42e35512d3e8a03..6bd8f225067d7cfaff04917d7f0add0bf2bd0585 100644 --- a/app/lib/pages/default_page.dart +++ b/app/lib/pages/default_page.dart @@ -45,7 +45,23 @@ class _DefaultPageState extends State<DefaultPage> { print('Request failed with status: ${response.statusCode}'); } } catch (e) { - print('Failed to connect to the server: $e'); + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: Text("Error"), + content: Text("Failed to connect to the server. Please check your network connection"), + actions: [ + TextButton( + onPressed: () { + Navigator.of(context).pop(); // Close the dialog + }, + child: Text("OK"), + ), + ], + ); + }, + ); } } diff --git a/app/lib/pages/widgets/map_widget.dart b/app/lib/pages/widgets/map_widget.dart index 430f4207bb82e4bd036b70be313fe225c789be50..33e6175aa66678dd49ee43cfd19fc3d41a077c9d 100644 --- a/app/lib/pages/widgets/map_widget.dart +++ b/app/lib/pages/widgets/map_widget.dart @@ -95,7 +95,7 @@ class _MapContainerWidgetState extends State<MapContainerWidget> { Center( child: Text( 'Placeholder', - style: textStyle, + style: regTextStyle, ), ), Positioned( @@ -138,11 +138,11 @@ class _MapContainerWidgetState extends State<MapContainerWidget> { ), Text( 'Latitude: ${selectedMarker?.geoData.latitude}', - style: textStyle, + style: regTextStyle, ), Text( 'Longitude: ${selectedMarker?.geoData.longitude}', - style: textStyle, + style: regTextStyle, ), const SizedBox(height: contPadding), SizedBox( @@ -175,7 +175,7 @@ class _MapContainerWidgetState extends State<MapContainerWidget> { const SizedBox(height: contPadding), SizedBox( width: screenWidth * boxWidth - contPadding * 2, - height: 200, + height: 160, child: BarChart( BarChartData( alignment: BarChartAlignment.spaceAround, @@ -249,7 +249,6 @@ class _MapContainerWidgetState extends State<MapContainerWidget> { ), ), ), - const SizedBox(height: contPadding), ], ); }, diff --git a/server/__pycache__/consts.cpython-311.pyc b/server/__pycache__/consts.cpython-311.pyc index 9ff52d124944e7e6b5fd6348a75357356a3572d9..b7f2592f2239ee05fd4207b4e5c35e5e08689ba6 100644 Binary files a/server/__pycache__/consts.cpython-311.pyc and b/server/__pycache__/consts.cpython-311.pyc differ diff --git a/server/__pycache__/data_structs.cpython-311.pyc b/server/__pycache__/data_structs.cpython-311.pyc index 234ac85964595741b6de2f77e9d025cb0ae7b722..e071b1d60a2ebf539fbf43547a01ca60a2060165 100644 Binary files a/server/__pycache__/data_structs.cpython-311.pyc and b/server/__pycache__/data_structs.cpython-311.pyc differ diff --git a/server/map/__pycache__/get_markers.cpython-311.pyc b/server/map/__pycache__/get_markers.cpython-311.pyc index 59bda76604761ffdecd11385bb472c5054fdf005..c218b600d9e5fb7a7e15ffd566a376b1d63f53a9 100644 Binary files a/server/map/__pycache__/get_markers.cpython-311.pyc and b/server/map/__pycache__/get_markers.cpython-311.pyc differ