Search
 
SCRIPT & CODE EXAMPLE
 

DART

flutter textbutton.icon

TextButton.icon(
            icon: Icon(Icons.camera),
            label: Text('Take A Photo'),
            onPressed: () {},
          )
Comment

flutter button with icon

ElevatedButton.icon(
          onPressed: () {},
          icon: Icon(Icons.email),
          label: Text("Contact me"),
          style: ElevatedButton.styleFrom(
            textStyle: TextStyle(fontSize: 15),
          ),
        ),
Comment

flutter iconbutton

IconButton(
            icon: Icon(
              Icons.directions_transit,
            ),
            onPressed: () {},
          ),
Comment

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.
Comment

flutter button with icon and text

ElevatedButton.icon(
              icon: Icon(Icons.home), 
              label: Text('ElevatedButton'),
              onPressed: () {},
            ),
Comment

PREVIOUS NEXT
Code Example
Dart :: how to give bottom padding in Listview in flutter 
Dart :: random colors for container flutter 
Dart :: flutter datatypes check 
Dart :: flutter main.dart 
Dart :: retrieve shared preferences flutter map 
Dart :: Dart set list spread operator 
Dart :: flutter date add time 
Dart :: flutter container 
Dart :: listview inside column flutter 
Dart :: dart variable in string 
Dart :: dart extension function 
Dart :: flutter padding 
Dart :: dart modulo 
Dart :: dispose in dart 
Dart :: flutter how to create copy button 
Dart :: flutter performance tips 
Dart :: how to make unordered list in flutter 
Dart :: flutter pub upgrade and save pubspec 
Dart :: timer.delay flutter 
Dart :: flutter firebase personal user data 
Dart :: flutter array filter 
Dart :: dart inheritance 
Dart :: flutter datacolumn center text 
Dart :: dart map.foreach 
Dart :: concat array dart 
Dart :: get current line number dart flutter 
Dart :: dart call nullable function 
Dart :: dart static method 
Dart :: dart 2d list join 
Dart :: dart compiler 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =