Flutter Tutorials

Flutter app development tutorials


flutter – Column max height

main.dart


import 'package:flutter/material.dart';

void main() {
  runApp(
      MaterialApp(
          theme: ThemeData(primarySwatch: Colors.blue),
          home: Scaffold(
              appBar: AppBar(
                  title: const Text("Flutter - Column Max Height")
              ),
              body: bodyContent()
          )
      )
  );
}

bodyContent(){
  return Column(
      mainAxisSize: MainAxisSize.max,
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        Container(color: Colors.yellow.shade400, height: 80),
        Container(color: Colors.purple.shade100, height: 90),
        Container(color: Colors.green.shade300, height: 120)
      ]
  );
}

More flutter tutorials



About Me

Flutter Developer

Design a site like this with WordPress.com
Get started