'Flutter -How To Expand a Column

I have a Column: child: Column( children: [ Container( height: 200, width: 300, color: Colors.red, ), Align( alignment: Alignment.bottomCenter, child: Text("This Product is Built By Imtiaz")), ], ), I want to Expand Column to print Text At Bottom Of Screen



Solution 1:[1]

You could put a Spacer() between your Text widget and your Container widget

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Center(
          child: Column(
            children: [
              Container(
                height: 200,
                width: 300,
                color: Colors.red,
              ),
              Spacer(),
              Text("This Product is Built By Imtiaz"),
            ],
          ),
        ),
      ),
    );
  }
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Young A