File tree Expand file tree Collapse file tree 5 files changed +49
-5
lines changed Expand file tree Collapse file tree 5 files changed +49
-5
lines changed Original file line number Diff line number Diff line change 1+ # v0.9.25-stable
2+
3+ add circle position support.
4+
15# v0.9.24-stable
26
37optimize performance overlay.
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ insult him.
595915 . wrapper constraints
606016 . staggered grid、grid、list(list is a special staggered grid, grid is also a special staggered
6161 grid)
62+ 17 . circle position
6263
6364Coming soon:
6465
@@ -85,12 +86,12 @@ dependencies:
8586 flutter_constraintlayout :
8687 git :
8788 url : ' https://github.com/hackware1993/Flutter-ConstraintLayout.git'
88- ref : ' v0.9.24 -stable'
89+ ref : ' v0.9.25 -stable'
8990` ` `
9091
9192` ` ` yaml
9293dependencies :
93- flutter_constraintlayout : ^0.9.24 -stable
94+ flutter_constraintlayout : ^0.9.25 -stable
9495` ` `
9596
9697` ` ` dart
@@ -653,6 +654,45 @@ class StaggeredGridExample extends StatelessWidget {
653654
654655![ staggered_grid.gif] ( https://github.com/hackware1993/flutter-constraintlayout/blob/master/staggered_grid.gif?raw=true )
655656
657+ 6 . circle position
658+
659+ ``` dart
660+ class CirclePositionExample extends StatelessWidget {
661+ const CirclePositionExample({Key? key}) : super(key: key);
662+
663+ @override
664+ Widget build(BuildContext context) {
665+ return Scaffold(
666+ body: ConstraintLayout(
667+ children: [
668+ Container(
669+ color: Colors.redAccent,
670+ ).applyConstraint(
671+ width: 100,
672+ height: 100,
673+ centerTo: parent,
674+ ),
675+ for (int angle = 0; angle <= 360; angle += 30)
676+ Container(
677+ color: Colors.yellow,
678+ ).applyConstraint(
679+ width: 50,
680+ height: 50,
681+ centerTo: rId(0),
682+ translate: circleTranslate(
683+ radius: 200,
684+ angle: angle,
685+ ),
686+ ),
687+ ],
688+ ),
689+ );
690+ }
691+ }
692+ ```
693+
694+ ![ circle_position.webp] ( https://github.com/hackware1993/flutter-constraintlayout/blob/master/circle_position.webp?raw=true )
695+
656696# Performance optimization
657697
6586981 . When the layout is complex, if the child elements need to be repainted frequently, it is
Original file line number Diff line number Diff line change @@ -22,15 +22,15 @@ class CirclePositionExample extends StatelessWidget {
2222 height: 100 ,
2323 centerTo: parent,
2424 ),
25- for (int angle = 0 ; angle <= 360 ; angle += 15 )
25+ for (int angle = 0 ; angle <= 360 ; angle += 30 )
2626 Container (
2727 color: Colors .yellow,
2828 ).applyConstraint (
2929 width: 50 ,
3030 height: 50 ,
3131 centerTo: rId (0 ),
3232 translate: circleTranslate (
33- radius: 300 ,
33+ radius: 200 ,
3434 angle: angle,
3535 ),
3636 ),
Original file line number Diff line number Diff line change 11name : flutter_constraintlayout
22description : A super powerful Stack, build flexible layouts with constraints. Similar to ConstraintLayout for Android and AutoLayout for iOS.
3- version : 0.9.24 -stable
3+ version : 0.9.25 -stable
44anthor : hackware
55homepage : https://github.com/hackware1993/Flutter-ConstraintLayout
66
You can’t perform that action at this time.
0 commit comments