@@ -9,7 +9,7 @@ flexibility, and a very flat code hierarchy than Flex and Stack. Say no to 'nest
99
1010View [ Flutter Web Online Example] ( https://constraintlayout.flutterfirst.cn )
1111
12- ** Flutter ConstraintLayout has extremely high layout performance because it does not require linear
12+ ** Flutter ConstraintLayout has extremely high layout performance. It does not require linear
1313equations to solve. It is recommended to use ConstraintLayout at the top level. For extremely
1414complex layout(One thousand child elements, two thousand constraints), layout and drawing total time
1515within 5 milliseconds(debug mode on Windows 10,release mode take less time), the frame rate can be
@@ -690,7 +690,7 @@ class CirclePositionExampleState extends State<CirclePositionExample> {
690690 void initState() {
691691 super.initState();
692692 calculateClockAngle();
693- timer = Timer.periodic(const Duration(seconds: 1), (timer ) {
693+ timer = Timer.periodic(const Duration(seconds: 1), (_ ) {
694694 calculateClockAngle();
695695 });
696696 }
@@ -739,39 +739,34 @@ class CirclePositionExampleState extends State<CirclePositionExample> {
739739 translateConstraint: true,
740740 ),
741741 for (int i = 0; i < 12; i++)
742- Container(
743- alignment: Alignment.center,
744- child: Text(
745- '${i + 1}',
746- style: const TextStyle(
747- fontWeight: FontWeight.bold,
748- fontSize: 25,
749- ),
742+ Text(
743+ '${i + 1}',
744+ style: const TextStyle(
745+ fontWeight: FontWeight.bold,
746+ fontSize: 25,
750747 ),
751748 ).applyConstraint(
752- width: 50,
753- height: 50,
754749 centerTo: rId(0),
755750 translate: circleTranslate(
756- radius: 200 ,
751+ radius: 205 ,
757752 angle: (i + 1) * 30,
758753 ),
759754 ),
760755 for (int i = 0; i < 60; i++)
761- Transform.rotate(
762- angle: pi + pi * (i * 6 / 180),
763- child: Container(
764- color: Colors.grey,
765- margin: const EdgeInsets.only(
766- top: 405,
756+ if (i % 5 != 0)
757+ Transform.rotate(
758+ angle: pi + pi * (i * 6 / 180),
759+ child: Container(
760+ color: Colors.grey,
761+ margin: const EdgeInsets.only(
762+ top: 405,
763+ ),
767764 ),
765+ ).applyConstraint(
766+ width: 1,
767+ height: 415,
768+ centerTo: rId(0),
768769 ),
769- ).applyConstraint(
770- width: 1,
771- height: 415,
772- centerTo: rId(0),
773- visibility: i % 5 == 0 ? gone : visible,
774- ),
775770 Transform.rotate(
776771 angle: pi + pi * (hour * 30 / 180),
777772 alignment: Alignment.topCenter,
0 commit comments