Flutter Tutorials

Flutter app development tutorials


flutter – Column background color

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



About Me

Flutter Developer

Design a site like this with WordPress.com
Get started