Answers for "flutter container alignment"

2

flutter align widget

Center(
        child: Container(
          color: Colors.blue[100], 
          height: 200.0,
          width: 200.0,
          child: Align(
            alignment: Alignment.center, // or AlignmentDirectional.center,
                     //Alignment(0.0,0.0) value must be 1 to -1
            child: Text('Align')
          )
        ),
      )
Posted by: Guest on August-29-2021
0

flutter move container to top center

Center(  child: Container( alignment: Alignment(0.0, -1.0),  ),);
Posted by: Guest on March-29-2020
0

how to align text in center in flutter container

Container(
        child: Align(
          alignment: Alignment.center,
          child: Text(
            'Some text here',
            style: TextStyle(

            ),
          ),
        ),
      ),
Posted by: Guest on December-19-2020

Browse Popular Code Answers by Language