Prepared AirQualityView layout and structure with PlaceHolder widgets.

This commit is contained in:
Faris Armoush
2025-05-22 12:24:13 +03:00
parent 5a61647fe4
commit d2eea33714

View File

@ -3,8 +3,57 @@ import 'package:flutter/material.dart';
class AirQualityView extends StatelessWidget { class AirQualityView extends StatelessWidget {
const AirQualityView({super.key}); const AirQualityView({super.key});
static const _padding = EdgeInsetsDirectional.all(32);
@override @override
Widget build(BuildContext context) { 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()),
],
),
),
],
),
),
);
},
);
} }
} }