@@ -6,11 +6,11 @@ import 'custom_app_bar.dart';
6
6
class WrapperConstraintsExample extends StatelessWidget {
7
7
const WrapperConstraintsExample ({Key ? key}) : super (key: key);
8
8
9
- Widget item (String text) {
9
+ Widget item (String text, [ Color color = Colors .redAccent] ) {
10
10
return Container (
11
11
width: 100 ,
12
12
height: 100 ,
13
- color: Colors .redAccent ,
13
+ color: color ,
14
14
alignment: Alignment .center,
15
15
child: FittedBox (
16
16
child: Text (text),
@@ -47,6 +47,30 @@ class WrapperConstraintsExample extends StatelessWidget {
47
47
right: 200 ,
48
48
),
49
49
),
50
+ item ('outTopLeftTo' ).applyConstraint (
51
+ outTopLeftTo: rId (1 ),
52
+ ),
53
+ item ('outTopCenterTo' ).applyConstraint (
54
+ outTopCenterTo: rId (1 ),
55
+ ),
56
+ item ('outTopRightTo' ).applyConstraint (
57
+ outTopRightTo: rId (1 ),
58
+ ),
59
+ item ('outCenterLeftTo' ).applyConstraint (
60
+ outCenterLeftTo: rId (1 ),
61
+ ),
62
+ item ('outCenterRightTo' ).applyConstraint (
63
+ outCenterRightTo: rId (1 ),
64
+ ),
65
+ item ('outBottomLeftTo' ).applyConstraint (
66
+ outBottomLeftTo: rId (1 ),
67
+ ),
68
+ item ('outBottomCenterTo' ).applyConstraint (
69
+ outBottomCenterTo: rId (1 ),
70
+ ),
71
+ item ('outBottomRightTo' ).applyConstraint (
72
+ outBottomRightTo: rId (1 ),
73
+ ),
50
74
item ('centerTopLeftTo' ).applyConstraint (
51
75
centerTopLeftTo: rId (0 ),
52
76
),
@@ -71,29 +95,32 @@ class WrapperConstraintsExample extends StatelessWidget {
71
95
item ('centerBottomRightTo' ).applyConstraint (
72
96
centerBottomRightTo: rId (0 ),
73
97
),
74
- item ('outTopLeftTo' ).applyConstraint (
75
- outTopLeftTo : rId (1 ),
98
+ item ('topLeftTo' , Colors .green ).applyConstraint (
99
+ topLeftTo : rId (1 ),
76
100
),
77
- item ('outTopCenterTo' ).applyConstraint (
78
- outTopCenterTo : rId (1 ),
101
+ item ('topCenterTo' , Colors .green ).applyConstraint (
102
+ topCenterTo : rId (1 ),
79
103
),
80
- item ('outTopRightTo' ).applyConstraint (
81
- outTopRightTo : rId (1 ),
104
+ item ('topRightTo' , Colors .green ).applyConstraint (
105
+ topRightTo : rId (1 ),
82
106
),
83
- item ('outCenterLeftTo' ).applyConstraint (
84
- outCenterLeftTo : rId (1 ),
107
+ item ('centerLeftTo' , Colors .green ).applyConstraint (
108
+ centerLeftTo : rId (1 ),
85
109
),
86
- item ('outCenterRightTo' ).applyConstraint (
87
- outCenterRightTo : rId (1 ),
110
+ item ('centerTo' , Colors .green ).applyConstraint (
111
+ centerTo : rId (1 ),
88
112
),
89
- item ('outBottomLeftTo' ).applyConstraint (
90
- outBottomLeftTo : rId (1 ),
113
+ item ('centerRightTo' , Colors .green ).applyConstraint (
114
+ centerRightTo : rId (1 ),
91
115
),
92
- item ('outBottomCenterTo' ).applyConstraint (
93
- outBottomCenterTo : rId (1 ),
116
+ item ('bottomLeftTo' , Colors .green ).applyConstraint (
117
+ bottomLeftTo : rId (1 ),
94
118
),
95
- item ('outBottomRightTo' ).applyConstraint (
96
- outBottomRightTo: rId (1 ),
119
+ item ('bottomCenterTo' , Colors .green).applyConstraint (
120
+ bottomCenterTo: rId (1 ),
121
+ ),
122
+ item ('bottomRightTo' , Colors .green).applyConstraint (
123
+ bottomRightTo: rId (1 ),
97
124
),
98
125
],
99
126
),
0 commit comments