How to place container in bottom of the screen in Flutter?

This Article is posted by seven.srikanth at 11/1/2022 2:34:00 PM



Here is an example code which can help you to place the container at the bottom on the screen.
Here is the code from main.dart file. 

import 'package:flutter/material.dart';
void main(List<String> args) {
  runApp(const MyApp());
}
class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @ override
  Widget build(BuildContext context) {
    return Align(
      alignment: FractionalOffset.bottomCenter,
      child: Container(
        height: 100,
        width: 100,
        decoration: const BoxDecoration(
          color: Colors.amber,
        ),
      ),
    );
  }
}
Thanks,
Srikanth

Tags: Align, Container,








0 Comments
Login to comment.
Recent Comments












© 2018 - Fluttercentral | Email to me - seven.srikanth@gmail.com