1)
import 'package:flutter/material.dart';
class HomeScreen extends StatelessWidget {
const HomeScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
bottom: false,
child: Container(
color: Colors.black,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Container(
height: 50.0,
width: 50.0,
color: Colors.red,
),
Container(
height: 50.0,
width: 50.0,
color: Colors.orange,
),
Container(
height: 50.0,
width: 50.0,
color: Colors.yellow,
),
Container(
height: 50.0,
width: 50.0,
color: Colors.green,
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: 50.0,
width: 50.0,
color: Colors.orange,
)
],
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
height: 50.0,
width: 50.0,
color: Colors.red,
),
Container(
height: 50.0,
width: 50.0,
color: Colors.orange,
),
Container(
height: 50.0,
width: 50.0,
color: Colors.yellow,
),
Container(
height: 50.0,
width: 50.0,
color: Colors.green,
)
],
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: 50.0,
width: 50.0,
color: Colors.green,
)
],
)
],
),
),
),
);
}
}

'개발이 좋아서 > Flutter가 좋아서' 카테고리의 다른 글
| [flutter] 전자액자 만들기 (1) | 2022.12.27 |
|---|---|
| [flutter] webview (2) | 2022.12.27 |
| [flutter] row and column_Expanded, Flexible (2) | 2022.12.23 |
| [flutter] row and column_mainAxisAlignment, crossAxisAlignment, mainAxisSize (0) | 2022.12.22 |
| [flutter] splash_screen (0) | 2022.12.22 |