A ToggleButtons widget is arranged in a row without spacing and rounded corners can only be applied to the first and last buttons.

ToggleButtons widget
ToggleButtons widget
ToggleButtons Widget: https://api.flutter.dev/flutter/material/ToggleButtons-class.html

How can I add spacing between the buttons with rounded corners? Wrapping an InkWell widget in a GridView widget does the trick! Let’s create a row of 3 toggle buttons with spacing and rounded corners:

Donna Tam

Software Developer at BeyondLabs Limited

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store