#FreePalestine 🇵🇸

Muhammed Mukhthar CM

How to change the Border Shape of InkWell widget?

Mar 25, 2021 1 min read

In the post about Creating Custom Buttons, we found about the InkWell widget. Now that we are creating Custom Buttons, we have a problem. The default splash of the InkWell widget is almost rectangle type. What if we need our shape of splash to have a border-radius?

To change the border of our splash to have a border-radius, we can the customBorder property of the InkWell widget.

InkWell(
    customBorder: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(10),
        ),
    child: YourWidget(),
),

The above code will control the flow of Splash to have a radius of 10 at all corners.

I think this post gave you a piece of valuable information. Let me know your suggestions and opinions in Twitter or drop a mail a [email protected].

Finally, if you found this helpful, please share this within your reach so that more people can benefit from this. And Follow me on Twitter for getting more posts like these 😉.

Join my email list to get the latest posts and updates.


Support Me