main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
theme: ThemeData(primarySwatch: Colors.pink),
home: Scaffold(
appBar: AppBar(
title: const Text("Flutter - Row Center Vertically")
),
body: bodyContent(),
backgroundColor: Colors.cyan.shade50
)
)
);
}
bodyContent(){
return SizedBox(
height: 250,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: [
Container(color: Colors.cyan.shade200, width: 50),
Container(color: Colors.cyan.shade400, width: 50),
Container(
color: Colors.cyan.shade600,
width: 50, height: 100
),
Container(color: Colors.cyan.shade800, width: 50),
Container(color: Colors.cyan.shade900, width: 50)
]
)
);
}
More flutter tutorials
- flutter – How to make a Card clickable
- flutter – Card circle shape
- flutter – Card rounded image padding
- flutter – Card clip behavior
- flutter – Column background color
- flutter – Column spacing
- flutter – Column height
- flutter – Column scrollable
- flutter – Column max height
- flutter – Column align right
- flutter – Column space between
- flutter – Column space around
- flutter – Row space around
- flutter – Row space evenly
- flutter – Row background color