How to Change the Text Button Color in the Flutter?

 

How to Change the Text Button Color in the Flutter?

You may use the built-in setColor function from android_material_palette. Note that there is an overload to this method, so you can actually pass the color argument for setting color(s) at one time. Also, note that you need to add the palette dependency in your pubspec.YAML file as follows:

flutter text button

By PHDinStackoverflowPHDinStackoverflow on Apr 20, 2021
TextButton(
  onPressed: () {
      // Respond to button press
  },
  child: Text("TEXT BUTTON"),
)

Add Comment

1

text button flutter

By VasteMondeVasteMonde on Mar 18, 2021
TextButton.icon({
  Key key, 
  @required VoidCallback onPressed, 
  VoidCallback onLongPress, 
  ButtonStyle style, 
  FocusNode focusNode, 
  bool autofocus, 
  Clip clipBehavior, 
  @required Widget icon, 
  @required Widget label
})
// Example:
TextButton.icon(
            icon: Icon(Icons.camera),
            label: Text('Take A Photo'),
            onPressed: () {},
          )

Add Comment

2

The MSocialButton widget allows the developers to configure its use of color for the background, text, primary & secondary actions, and more. Each button has a default color but can be configured individually by simply replacing them in the code.


Comments

Popular posts from this blog

How to Send Whatsapp Message Through HTML Link?

rigidbody.addforce not working