Width

Utilities for setting the width of a widget.

The width constants are defined inside StiloWidth
name width
w0
0px
w1
4px
w2
8px
w3
12px
w4
16px
w5
20px
w6
24px
w7
28px
w8
32px
w9
36px
w10
40px
w11
44px
w12
48px
w14
56px
w16
64px
w20
80px
w24
96px
w28
112px
w32
128px
w36
144px
w40
160px
w44
176px
w48
192px
w52
208px
w56
224px
w60
240px
w64
256px
w72
288px
w80
320px
w96
384px
oneHalf
50% of the screen size
oneThird
33.333333% of the screen size
twoThirds
66.666667% of the screen size
oneQuarter
25% of the screen size
twoQuarters
50% of the screen size
threeQuarters
75% of the screen size
oneFifth
20% of the screen size
twoFifths
40% of the screen size
threeFifths
60% of the screen size
fourFifths
80% of the screen size
oneSixth
16.666667% of the screen size
twoSixths
33.333333% of the screen size
threeSixths
50% of the screen size
fourSixths
66.666667% of the screen size
fiveSixths
83.333333% of the screen size
oneTwelfth
8.333333% of the screen size
twoTwelfths
16.666667% of the screen size
threeTwelfths
25% of the screen size
fourTwelfths
33.333333% of the screen size
fiveTwelfths
41.666667% of the screen size
sixTwelfths
50% of the screen size
sevenTwelfths
58.333333% of the screen size
eightTwelfths
66.666667% of the screen size
nineTwelfths
75% of the screen size
tenTwelfths
83.333333% of the screen size
elevenTwelfths
91.666667% of the screen size
full
100% of the screen size

Usage Example

Center(
    child: Row(
      children: [
        Container(
          width: StiloWidth.w64,
          height: StiloHeight.h36,
          color: StiloColor.blue[500],
        ),
        Container(
          width: StiloWidth.w36,
          height: StiloHeight.h64,
          color: StiloColor.red[500],
        ),
      ],
    ),
  )