How to have togglebutton take the whole space in a container?
Solution 1:
To get the full width ToggleButtons you can use LayoutBuilder
.
LayoutBuilder(
builder: (context, constraints) => ToggleButtons(
constraints: BoxConstraints.expand(width: constraints.maxWidth/2),
....
Your CODE
....
)
);
This will dynamically expand your ToggleButtons
to full width.