How to change AlertDialog Border Radius in Flutter

Tweaking border-radius helps us to create rounded corners. UI elements with rounded corners always look beautiful. In this Flutter tutorial, let’s learn how to change the border radius of AlertDialog. Following is the default border radius of AlertDialog in Flutter. You can change the border radius using the shape property and the RoundedRectangleBorder class. See…

How to set Height and Width for TextButton in Flutter

TextButton is one of the popular Flutter widgets available to create buttons. By default, the size of TextButton depends on the text size and other factors such as padding. Let’s learn how to set fixed height and width for TextButton in this Flutter tutorial. In order to set a fixed size for TextButton, it provides…

How to add Background Color to TextButton in Flutter

TextButton is one of the most important button widgets of Flutter. There are many ways to customize a TextButton. In this Flutter tutorial, let’s learn how to set the TextButton background color. TextButton.styleFrom() method can be used to style the TextButton. It has many properties and backgroundColor is one among them to change the text…

How to change Color of TextButton in Flutter

TextButton in Flutter helps to convert a text to button easily. The TextButton has different properties to customize it. In this Flutter tutorial, let’s learn how to change the color of TextButton. By default, the color of TextButton is inherited from the theme. You can use styleFrom() method with TextButton to style the text, color,…

How to add Text Button in Flutter

Flutter has different types of buttons namely- ElevatedButton, OutlinedButton, TextButton, etc. The TextButton in Flutter helps to create button text easily. Let’s jump into this Flutter TextButton tutorial. The TextButton class is similar to FlatButton which is deprecated. You can pass the Text widget as its child and style the button using styleFrom() method. See…

How to set Gradient Background for AppBar in Flutter

Gradients created with multiple colors always make UI components more attractive. Let’s learn how to add AppBar with a gradient background in Flutter. The flexibleSpace property helps to add widgets to customize AppBar. Using BoxDecoration and LinearGradient you can create a gradient background. See the code snippet given below. Following is the output of AppBar…