Answers for "flutter custom 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
3

flutter align top right

Align(
  alignment: Alignment.topRight,
  child: Text("widget"),
)
Posted by: Guest on July-27-2020
0

Align widget

Center(
  child: Container(
    height: 120.0,
    width: 120.0,
    color: Colors.blue[50],
    child: Align(
      alignment: Alignment(0.5, 0.6),
      child: FlutterLogo(
        size: 60,
      ),
    ),
  ),
)
Posted by: Guest on October-05-2020

Code answers related to "Dart"

Browse Popular Code Answers by Language