Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase Flutter Radio Widget size

I am using default Flutter Radio Widget. I want to increase its size but there is no property available for it.

Tried using SizedBox with width: 50, height: 50. Didn't help.

Not want to implement a whole custom radio button. Just want to increase the default's size. Thanks

like image 293
Muhammad Amir Avatar asked Jan 16 '20 12:01

Muhammad Amir


People also ask

How do you use the radio widget in Flutter?

A radio button can be selected by clicking the mouse on the circular hole or using a keyboard shortcut. In this section, we are going to explain how to use radio buttons in Flutter. Flutter allows us to use radio buttons with the help of 'Radio', 'RadioListTile', or 'ListTitle' Widgets.

How do you reduce the space between radio button and text in Flutter?

The easiest way to achieve this is by wrapping the Radio without any padding, in a Container and then setting your custom Margin and Padding as(if) required.

How do I change the color of my radio Flutter?

To change radio button color in Flutter, add fillColor property to the Radio widget. Inside the fillColor use the MaterialStateColor to add the color of your choice.


2 Answers

Well you can wrap it in Transform.Scale then use the scale property to increase it.

Transform.scale(
       scale: 2.0,
       child: Radio(
       value: 'wire',
       groupValue: selectedRadio,
       onChanged: (value)=>radioSelected(value),
       activeColor: Color(0xffFFBD11),
      ),
    ),
like image 85
M.M.Hasibuzzaman Avatar answered Oct 19 '22 17:10

M.M.Hasibuzzaman


I don't think this is possible without creating your own Widget.

You should have a look at this package.

like image 23
Augustin R Avatar answered Oct 19 '22 18:10

Augustin R