@@ -88,6 +88,27 @@ layouts to reflect the chosen values.
8888 }),
8989 ],
9090 );
91+ final paddingControls = RowComponent (
92+ gap: 16 ,
93+ children: [
94+ TextComponent (text: 'Padding:' ),
95+ ...[
96+ EdgeInsets .zero,
97+ const EdgeInsets .all (16 ),
98+ const EdgeInsets .symmetric (vertical: 8 , horizontal: 24 ),
99+ ].map ((padding) {
100+ return ButtonComponent (
101+ button: TextComponent (text: padding.toString ()),
102+ onPressed: () {
103+ rowDemo.children.query <PaddingComponent >().first.padding =
104+ padding;
105+ columnDemo.children.query <PaddingComponent >().first.padding =
106+ padding;
107+ },
108+ );
109+ }),
110+ ],
111+ );
91112 final rootColumnComponent = ColumnComponent (
92113 position: Vector2 (48 , 48 ),
93114 gap: 24 ,
@@ -107,6 +128,7 @@ layouts to reflect the chosen values.
107128 crossAxisControls,
108129 gapControls,
109130 sizeControls,
131+ paddingControls,
110132 rowDemo,
111133 columnDemo,
112134 ],
@@ -125,9 +147,12 @@ layouts to reflect the chosen values.
125147 TextComponent (
126148 text: 'Perhaps a bit longer text' ,
127149 ),
128- CircleComponent (
129- radius: 48 ,
130- paint: Paint ()..color = Colors .blue,
150+ PaddingComponent (
151+ padding: EdgeInsets .zero,
152+ child: CircleComponent (
153+ radius: 48 ,
154+ paint: Paint ()..color = Colors .blue,
155+ ),
131156 ),
132157 ];
133158 }
0 commit comments