Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NoAirQualityDataPage to display error message for missing air qua… #2318

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 NoAirQualityDataPage extends StatelessWidget {
const NoAirQualityDataPage({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/error_occured.svg',
width: maxWidth * 0.5,
height: maxWidth * 0.5,
),
SizedBox(height: maxHeight * 0.05),
Text(
"No Air Quality Data",
style: Theme.of(context).textTheme.headlineLarge!.copyWith(
fontSize: maxWidth * 0.06,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: maxHeight * 0.02),
Text(
"We're having issues with our network\nno worries, we'll be back up soon.",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: maxWidth * 0.04,
),
),
],
);
},
);
}
}
Loading