Reputation:
I am trying to look for an example in flutter in which there could be buttons on the bottom part of the ListTile
. I have the below code, but somehow I am not able to add buttons in the bottom of the cell , I want to add 3 buttons , similar to the image shared
ListTile(title: Text("ListTile"),
subtitle: Text("Sample Subtitle. \nSubtitle line 3"),
trailing: Icon(Icons.home),
leading: Icon(Icons.add_box),
isThreeLine: true,
onTap: (){
print("On Tap is fired");
},
)
Upvotes: 3
Views: 11518
Reputation: 371
You can use, ButtonBar
ButtonBar(children: [
FlatButton(
child: Text("Initialised Love"),
onPressed: () {},
),
]),
Upvotes: 0
Reputation: 1939
Try A Column with 2 Rows in your subtitle.
subtitle: Column(
children: <Widget>[
Container(height: 50, color: Colors.red, child: Row()),
Container(
child: Row(
children: <Widget>[
FlatButton(
child: Text("btn1"),
onPressed: () {},
),
FlatButton(
child: Text("btn2"),
onPressed: () {},
),
FlatButton(
child: Text("btn3"),
onPressed: () {},
),
],
))
],
),
Upvotes: 0
Reputation: 963
you can use a column inside your subtitle
like this:
ListTile(
title: Text('title'),
subtitle: Column(
children: <Widget>[
Text('inside column'),
FlatButton(child: Text('button'), onPressed: () {})
],
),
),
preview on code pen
Upvotes: 3