TextButton.icon(
icon: Icon(Icons.camera),
label: Text('Take A Photo'),
onPressed: () {},
)
ElevatedButton.icon(
onPressed: () {},
icon: Icon(Icons.email),
label: Text("Contact me"),
style: ElevatedButton.styleFrom(
textStyle: TextStyle(fontSize: 15),
),
),
IconButton(
icon: Icon(
Icons.directions_transit,
),
onPressed: () {},
),
Flutter has WidgetSpan() to add a widget inside the RichText().
Example use:
RichText(
text: TextSpan(
children: [
TextSpan(
text: "Click ",
),
WidgetSpan(
child: Icon(Icons.add, size: 14),
),
TextSpan(
text: " to add",
),
],
),
)
Above code will produce:
Click + to add
You can treat the child of WidgetSpan like the usual widget.
ElevatedButton.icon(
icon: Icon(Icons.home),
label: Text('ElevatedButton'),
onPressed: () {},
),