Ideally, I'd like to do this
SizedBox(
height: 20.0,
width: 25%,
),
instead of
SizedBox(
height: 20.0,
width: 150.0,
),
Thanks! Super new to Flutter, appreciate the guidance!
Ideally, I'd like to do this
SizedBox(
height: 20.0,
width: 25%,
),
instead of
SizedBox(
height: 20.0,
width: 150.0,
),
Thanks! Super new to Flutter, appreciate the guidance!
Try this:
MediaQuery.of(context).size.width * 0.25;
It gets the width of the device and multiplies it by 0.25 for that 25% you are looking for. Hope it helps!