Skip to content

Commit

Permalink
Merge pull request #2320 from airqo-platform/map-search-error-state-s…
Browse files Browse the repository at this point in the history
…creen

Add MapSearchErrorPage with location icon for no results found
  • Loading branch information
Baalmart authored Dec 10, 2024
2 parents 6e7d5da + 8219db9 commit 1f52223
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mobile-v3/assets/icons/location.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions mobile-v3/lib/src/app/map/pages/map_search_error_page.dart
Original file line number Diff line number Diff line change
@@ -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,
),
),
],
);
},
);
}
}

0 comments on commit 1f52223

Please sign in to comment.