import 'package:flutter/material.dart';
class LayoutExplanationScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Layout Explanation'),
),
body: Center(
child: Padding(
padding: EdgeInsets.all(16),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'Why do layout widgets arrange child widgets?',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
textAlign: TextAlign.center,
),
SizedBox(height: 12),
Text(
'Layout widgets arrange child widgets to control how they appear on the screen. '
'They decide the position, size, and alignment of each child, '
'making the app look organized and easy to use.',
style: TextStyle(fontSize: 16),
textAlign: TextAlign.center,
),
],
),
),
),
);
}
}This screen uses a Column widget inside a Center widget to arrange two Text widgets vertically and center them horizontally. Padding is added around the column to keep the text away from the edges. The layout widget (Column) arranges its children to control their position and size, which is why layout widgets are important in Flutter.