Muhammad Amir
Muhammad Amir

Reputation: 672

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

Upvotes: 17

Views: 16596

Answers (3)

Ebuzer SARIYERLİOĞLU
Ebuzer SARIYERLİOĞLU

Reputation: 818

You can use Transform.scale widget for this.

Transform.scale(
   scale: 3.0,
   child: 
 Radio(
   value: 10,
   groupValue: yourValue,
   onChanged: (value){radioSelected(yourVar=value)},
  ),
),

Upvotes: 1

M.M.Hasibuzzaman
M.M.Hasibuzzaman

Reputation: 1151

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),
      ),
    ),

Upvotes: 37

Augustin R
Augustin R

Reputation: 7809

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

You should have a look at this package.

Upvotes: 1

Related Questions