Create a rounded-button or a button with border-radius
There are three major types of Buttons available in Flutter. They are the RaisedButton, FlatButton, and IconButton. In this example, we will learn how to add a border-radius to a button using RaisedButton for example. The border-radius can be given using
- Shape property
- Clipping using ClipRRect
Using shape property
In this example, we give a small border-radius to the corners of the button using shape property.
If you need a pill-shaped button, you can either use RoundedRectangularBorder or StadiumBorder for the shape property.
We can also give border-radius by clipping. For this, you need to wrap the RaisedButton with a ClipRRect as shown in the example below.
How to Make Glowing Play Button Animation in Flutter?
This widget can be used in a UI as play button for a music player, start button for games or even as loading indicator.
How to Create Instagram like Story Circle Animation in Flutter?
Simple step by step guide on how to create Instagram story circle animation with Flutter.
Polygon clipper in Flutter
A guide on how to clip images in various polygon shapes using polygon_clipper in Flutter