@@ -160,12 +160,14 @@ two-way constraints, such as chains(not yet supported, please use with Flex).
160
160
1 . fixed size(>=0)
161
161
2 . matchParent(default)
162
162
3 . wrapContent(minimum and maximum are temporarily not supported)
163
+ 23 . layout debugging
163
164
164
165
Follow-up development plan:
165
166
166
167
1 . chain
167
168
2 . constraints visualization
168
- 3 . more...
169
+ 3 . provides a visual editor to create layouts by dragging and dropping
170
+ 4 . more...
169
171
170
172
Support platform:
171
173
@@ -185,12 +187,12 @@ dependencies:
185
187
flutter_constraintlayout :
186
188
git :
187
189
url : ' https://github.com/hackware1993/Flutter-ConstraintLayout.git'
188
- ref : ' v1.4.4 -stable'
190
+ ref : ' v1.5.0 -stable'
189
191
` ` `
190
192
191
193
` ` ` yaml
192
194
dependencies :
193
- flutter_constraintlayout : ^1.4.4 -stable
195
+ flutter_constraintlayout : ^1.5.0 -stable
194
196
` ` `
195
197
196
198
` ` ` dart
@@ -1335,24 +1337,24 @@ class BarrierExample extends StatelessWidget {
1335
1337
5 . Do you need to rearrange the order of event distribution?
1336
1338
1337
1339
These comparisons will not be a performance bottleneck, but will increase CPU usage. If you know
1338
- enough about the internals of ConstraintLayout, you can use ConstraintVersion to manually trigger
1339
- these operations to stop parameter comparison.
1340
+ enough about the internals of ConstraintLayout, you can use ConstraintLayoutController to manually
1341
+ trigger these operations to stop parameter comparison.
1340
1342
1341
1343
``` dart
1342
- class ConstraintVersionExampleState extends State<ConstraintVersionExample > {
1344
+ class ConstraintControllerExampleState extends State<ConstraintControllerExample > {
1343
1345
double x = 0;
1344
1346
double y = 0;
1345
- ConstraintVersion constraintVersion = ConstraintVersion ();
1347
+ ConstraintLayoutController controller = ConstraintLayoutController ();
1346
1348
1347
1349
@override
1348
1350
Widget build(BuildContext context) {
1349
1351
return Scaffold(
1350
1352
appBar: const CustomAppBar(
1351
- title: 'Constraint Version ',
1352
- codePath: 'example/constraint_version .dart',
1353
+ title: 'Constraint Controller ',
1354
+ codePath: 'example/constraint_controller .dart',
1353
1355
),
1354
1356
body: ConstraintLayout(
1355
- constraintVersion: constraintVersion ,
1357
+ controller: controller ,
1356
1358
children: [
1357
1359
GestureDetector(
1358
1360
child: Container(
@@ -1364,14 +1366,14 @@ class ConstraintVersionExampleState extends State<ConstraintVersionExample> {
1364
1366
setState(() {
1365
1367
x += details.delta.dx;
1366
1368
y += details.delta.dy;
1367
- constraintVersion.incPaintVersion ();
1369
+ controller.markNeedsPaint ();
1368
1370
});
1369
1371
},
1370
1372
).applyConstraint(
1371
1373
size: 200,
1372
1374
centerTo: parent,
1373
1375
translate: Offset(x, y),
1374
- ),
1376
+ )
1375
1377
],
1376
1378
),
1377
1379
);
0 commit comments