Issue
Hi. I have attached a snapshot. Can anyone tell me how I can get this circle image and below text in one widget ? Is there any such single widget in flutter ? Instead of using 3 widgets column, container and text widgets.
[![Attached Snapshot][1]]
[1]: https://i.stack.imgur.com/TlLwK.png
Solution
Try below code hope it solve your problem:
ButtonBar(
alignment: MainAxisAlignment.spaceAround,
children: [
Column(
children: [
ElevatedButton(
onPressed: () {},
child: Icon(Icons.check, color: Colors.white),
style: ElevatedButton.styleFrom(
shape: CircleBorder(),
padding: EdgeInsets.all(20),
primary: Colors.grey, // <-- Button color
onPrimary: Colors.red, // <-- Splash color
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text('Nike'),
),
],
),
Column(
children: [
ElevatedButton(
onPressed: () {},
child: Icon(Icons.add, color: Colors.white),
style: ElevatedButton.styleFrom(
shape: CircleBorder(),
padding: EdgeInsets.all(20),
primary: Colors.grey, // <-- Button color
onPrimary: Colors.red, // <-- Splash color
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text('Add'),
),
],
),
Column(
children: [
ElevatedButton(
onPressed: () {},
child: Icon(Icons.edit, color: Colors.white),
style: ElevatedButton.styleFrom(
shape: CircleBorder(),
padding: EdgeInsets.all(20),
primary: Colors.grey, // <-- Button color
onPrimary: Colors.red, // <-- Splash color
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text('Edit'),
),
],
),
Column(
children: [
ElevatedButton(
onPressed: () {},
child: Icon(Icons.menu, color: Colors.white),
style: ElevatedButton.styleFrom(
shape: CircleBorder(),
padding: EdgeInsets.all(20),
primary: Colors.grey, // <-- Button color
onPrimary: Colors.red, // <-- Splash color
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text('Menu'),
),
],
),
],
),
Answered By – Ravindra S. Patil
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0