As a newbie to flutter stylying I am trying to create a row looking like this
I am unable to have the textField to the left with a fluid width and the car Icon to the far right.
I tried to hack it with Stack but the text override the Icon when it reaches it. can someone offer a better way to put those two widgets side by side.
My try
Positioned(
top: 50.0,
right: 15.0,
left: 15.0,
child: Container(
height: 50.0,
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(3.0),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.grey,
offset: Offset(1.0, 5.0),
blurRadius: 10,
spreadRadius: 3)
],
),
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: Stack(
children: [
TextField(
cursorColor: Colors.black,
// controller: appState.locationController,
decoration: InputDecoration(
hintText: "pick up",
border: InputBorder.none,
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// contentPadding: EdgeInsets.only(left: 15.0, top: 16.0),
icon: Container(
margin: EdgeInsets.only(left: 10),
width: 10,
height: 10,
child: Icon(
Icons.location_on,
color: Colors.black,
),
),
),
),
Positioned(
right: 8,
child: IconButton(icon: Icon(Icons.business), onPressed: () {})
)
],
),
),
]
),
]
),
),
),


