How to Dynamically Disable and Enable Button in Flutter

Sometimes, we may need to disable and enable buttons in our apps. In this flutter example, I am showing you how to enable and disable elevated button. The ElevatedButton is enabled by default. But you can easily disable it by passing null to the onPressed property. See the snippet below. In practical scenarios, you always … Read more

How to Make the Text Copyable in Flutter

By default, users can’t copy the Text content of a flutter app. Sometimes, we want to let users to copy text content to the clipboard. Let’s check how to create copyable text in flutter in such cases. You can create copyable Text in flutter using SelectableText class. It’s very easy as given below. Following is … Read more

Dynamically Hide and Unhide Widgets in Flutter

We know, a flutter app is composed of numerous widgets. In some scenarios, we may want to hide and show any specific widget depending on certain situations. This can be done easily using the Visibility class. The widget which is to be hidden should be the child of the Visibility widget. The visibility is managed … Read more

How to Change Border Color of ElevatedButton in Flutter

We already know how to add an ElevatedButton in flutter and how to change the background color of the ElevatedButton. In this blog post, let’s check how to change the border color of an Elevated Button in Flutter. The style parameter and the styleFrom method should be used to change the default style of the … Read more

How to Create a Round Image in Flutter

Sometimes, we may want to show images in rounded shapes in our apps. One such example is the profile image of the user. In this Flutter tutorial, let’s check how to add a rounded image in Flutter. In the previous blog post, how to add an image with rounded corners we used the ClipRRect widget. … Read more

How to create an ElevatedButton with Rounded Corners in Flutter

We already know how to add an ElevatedButton in flutter. A button with rounded corners is always beautiful to see. In this blog post, let’s check how to create an Elevated Button with rounded corners in Flutter. The style parameter and the styleFrom method should be used to create custom styles for the ElevatedButton. The … Read more

How to add Image with Rounded Corners in Flutter

Rounded corners are more beautiful than sharp corners. In this Flutter tutorial, let’s check how to add an image with rounded corners. I already have a blog post on adding rounded corners in Flutter. As mentioned there, we have to use ClipRRect class to create rounded corners. It’s very easy. We just need to make … Read more

How to Change the Color of ElevatedButton in Flutter

The ElevatedButton is the ready-to-go button for Flutter. I already have a blog post on adding ElevatedButton in flutter. Now, let’s check how to change the color of the elevated button in Flutter. By default, the ElevatedButton inherits the theme color. We can tweak the background color, as well as the foreground color of the … Read more

How to Create a Circle Shape in Flutter

Sometimes, the user interface of a mobile app can be complex. We may need to add custom shapes for design purposes. In this Flutter example, Let’s see how to create a round shape in flutter easily. You can create a circle in flutter easily using Container, BoxDecoration, and BoxShape widgets as given below. Following is … Read more

How to Add an Elevated Button in Flutter

Flutter has made the RaisedButton class obsolete and it recommends using ElevatedButton class. In this blog post, let’s check how to create a button using ElevatedButton class. An elevated button is a button that is based on the material design. Its elevation increases when the button is pressed. It has a default style and you … Read more