How to Disable TextButton in Flutter

Flutter has so many Button widgets and the TextButton is one of them. Sometimes, we may want to disable a button. In this Flutter tutorial, let us check how to disable a TextButton. Disabling TextButton is pretty easy. All you need is to pass a null value to the onPressed property. See the code snippet … Read more

How to add TextButton Border in Flutter

The TextButton widget helps to transform the text into a button easily. You can customize the TextButton in many ways. Let’s learn how to add a border to TextButton in this Flutter tutorial. Borders help to give UI elements a distinct look. By leveraging TextButton.styleFrom() method you can style the button easily. Using the side … Read more

How to add Padding to TextButton in Flutter

TextButton is one of the most used buttons in Flutter. It helps to make text clickable and acts as a button. Even though default padding is enough for TextButton, sometimes you may want to customize padding. Let’s check how to add padding to TextButton in Flutter. One way to style the TextButton is to use … Read more

How to add Icon to TextButton in Flutter

There are different types of buttons available in Flutter. TextButton is one among them and it helps to convert text to a button. In this Flutter tutorial, let’s learn how to add an icon to TextButton easily. Adding a TextButton is easy but in order to add an icon beside the button you have to … Read more

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, … Read more

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 … Read more

How to add Icon Button to AppBar in Flutter

AppBar is an important UI component in a mobile app. In this Flutter tutorial, let’s learn how to add an icon button to AppBar. The AppBar has actions property which allows displaying a list of widgets in a row after the title. We use actions to add IconButton. We also show a Snackbar when the … Read more

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 … Read more

How to set Background Image for AppBar in Flutter

AppBar is one of the most used widgets in Flutter. It is also highly customizable. In this Flutter tutorial, let’s learn how to show an AppBar with an image background. First, you must add an image to your project and mention it in the pubspec.yaml file. The AppBar has a property named flexibleSpace and it … Read more

How to make Flutter AppBar Transparent

Transparency is often used in mobile app design to create visually appealing Ul elements. Let’s learn how to make AppBar transparent in this Flutter tutorial. AppBar has backgroundColor property to change the background color. We apply Colors.transparent as the background color. The next thing is to make elevation property zero so that the shadows because … Read more