Reputation: 23
I would like my container to start from the left edge, so that you only see three sides of the container: the top, bottom, and right. I've tried making the margins (0, x, y, z) from LTRB, but the container is still floating out farther right than I'd like.
My code:
return Scaffold(
body: Column(
children: <Widget>[
Container(
decoration: BoxDecoration(
color: Colors.black,
border: Border.all(
color: Colors.black,
),
borderRadius: BorderRadius.all(Radius.circular(10))
),
padding: EdgeInsets.all(10),
margin: EdgeInsets.fromLTRB(0, 30, 170, 0),
child: Text('MENTIONS',
...
Upvotes: 1
Views: 1030
Reputation: 23
return Scaffold(
body: Column(
crossAxisAlignment: CrossAxisAlignment.start, // <=== try this maybe
children: <Widget>[
Container(
decoration: BoxDecoration(
color: Colors.black,
border: Border.all(
color: Colors.black,
),
borderRadius: BorderRadius.all(Radius.circular(10))
),
margin: EdgeInsets.fromLTRB(0, 30, 170, 0),
child: Text('MENTIONS',
Upvotes: 1