Answers for "flutter text button with icon"

1

icon as button flutter

IconButton(
            icon: Icon(
              Icons.directions_transit,
            ),
            iconSize: 50,
            color: Colors.green,
            splashColor: Colors.purple,
            onPressed: () {},
          ),
Posted by: Guest on June-01-2021
2

flutter text with icon

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.
Posted by: Guest on April-18-2021
1

flutter button with icon

ElevatedButton.icon(
          onPressed: () {},
          icon: Icon(Icons.email),
          label: Text("Contact me"),
          style: ElevatedButton.styleFrom(
            textStyle: TextStyle(fontSize: 15),
          ),
        ),
Posted by: Guest on September-18-2021

Code answers related to "flutter text button with icon"

Browse Popular Code Answers by Language