From d2eea337141650e9235b17709640eb28008e13e6 Mon Sep 17 00:00:00 2001 From: Faris Armoush Date: Thu, 22 May 2025 12:24:13 +0300 Subject: [PATCH] Prepared `AirQualityView` layout and structure with PlaceHolder widgets. --- .../air_quality/views/air_quality_view.dart | 51 ++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/lib/pages/analytics/modules/air_quality/views/air_quality_view.dart b/lib/pages/analytics/modules/air_quality/views/air_quality_view.dart index 8844eb9f..ef2b8f51 100644 --- a/lib/pages/analytics/modules/air_quality/views/air_quality_view.dart +++ b/lib/pages/analytics/modules/air_quality/views/air_quality_view.dart @@ -3,8 +3,57 @@ import 'package:flutter/material.dart'; class AirQualityView extends StatelessWidget { const AirQualityView({super.key}); + static const _padding = EdgeInsetsDirectional.all(32); + @override Widget build(BuildContext context) { - return const Placeholder(); + return LayoutBuilder( + builder: (context, constraints) { + final isMediumOrLess = constraints.maxWidth <= 900; + final height = MediaQuery.sizeOf(context).height; + if (isMediumOrLess) { + return SingleChildScrollView( + padding: _padding, + child: Column( + spacing: 32, + children: [ + SizedBox(height: height * 1.2, child: const Placeholder()), + SizedBox(height: height * 0.5, child: const Placeholder()), + SizedBox(height: height * 0.5, child: const Placeholder()), + ], + ), + ); + } + + return SingleChildScrollView( + child: Container( + padding: _padding, + height: height * 1, + child: const Column( + children: [ + Expanded( + child: Row( + spacing: 32, + children: [ + Expanded( + flex: 2, + child: Column( + spacing: 20, + children: [ + Expanded(child: Placeholder()), + Expanded(child: Placeholder()), + ], + ), + ), + Expanded(child: Placeholder()), + ], + ), + ), + ], + ), + ), + ); + }, + ); } }