main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
theme: ThemeData(primarySwatch: Colors.blueGrey),
home: Scaffold(
appBar: AppBar(
title: const Text("Flutter - Column Background Color")
),
body: bodyContent()
)
)
);
}
bodyContent(){
return Container(
padding: const EdgeInsets.all(8),
color: Colors.green.shade100,
child: Column(
children: List.generate(7, (index){
return Container(
height: 50,
color: Colors.pink.shade600,
margin: const EdgeInsets.all(8)
);
})
)
);
}
More flutter tutorials
- flutter – Column spacing
- flutter – Column full width
- flutter – Column align left
- flutter – Column center
- flutter – Column items equal height
- flutter – Column items stretch horizontally
- flutter – Column height wrap content
- flutter – Column align bottom
- flutter – Column align bottom right
- flutter – Column space evenly
- flutter – Column vertical direction
- flutter – Row space between
- flutter – Row height
- flutter – Row center
- flutter – Row width