Friday, 20 January 2023

Add Border, BorderColor, Align to Container

 

 Container(
              height: 150,
              width: 150,
              margin: EdgeInsets.all(8),
              decoration: BoxDecoration(
                  borderRadius: BorderRadius.all(Radius.circular(8)),
                  color: Colors.blue,
                  border: Border.all(width: 5, color: Colors.green)),
              padding: EdgeInsets.symmetric(horizontal: 10, vertical: 8),
              child: Align(
                alignment: Alignment.center,
                child: Text(
                  "Container 1",
                  style: TextStyle(color: Colors.white),
                ),
              ),
            ),
Screenshot:

No comments:

Post a Comment