From 8219db95d1d771153e40a5df39ffa7494ecd8516 Mon Sep 17 00:00:00 2001 From: Peter Kyeyune Date: Tue, 10 Dec 2024 21:38:35 +0300 Subject: [PATCH] Add MapSearchErrorPage with location icon for no results found --- mobile-v3/assets/icons/location.svg | 4 ++ .../app/map/pages/map_search_error_page.dart | 43 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 mobile-v3/assets/icons/location.svg create mode 100644 mobile-v3/lib/src/app/map/pages/map_search_error_page.dart diff --git a/mobile-v3/assets/icons/location.svg b/mobile-v3/assets/icons/location.svg new file mode 100644 index 0000000000..71f2df1361 --- /dev/null +++ b/mobile-v3/assets/icons/location.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/mobile-v3/lib/src/app/map/pages/map_search_error_page.dart b/mobile-v3/lib/src/app/map/pages/map_search_error_page.dart new file mode 100644 index 0000000000..4d3eedb5ee --- /dev/null +++ b/mobile-v3/lib/src/app/map/pages/map_search_error_page.dart @@ -0,0 +1,43 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class MapSearchErrorPage extends StatelessWidget { + const MapSearchErrorPage({super.key}); + + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (context, constraints) { + double maxWidth = constraints.maxWidth; + double maxHeight = constraints.maxHeight; + + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SvgPicture.asset( + 'assets/icons/location.svg', + width: maxWidth * 0.5, + height: maxWidth * 0.5, + ), + SizedBox(height: maxHeight * 0.05), + Text( + "No results found", + style: Theme.of(context).textTheme.headlineLarge!.copyWith( + fontSize: maxWidth * 0.06, + fontWeight: FontWeight.bold, + ), + ), + SizedBox(height: maxHeight * 0.02), + Text( + "Please try again with a different location name", + textAlign: TextAlign.center, + style: TextStyle( + fontSize: maxWidth * 0.04, + ), + ), + ], + ); + }, + ); + } +} \ No newline at end of file