Skip to content

Commit 7b172da

Browse files
author
fbchen
committed
release v0.9.25-stable
1 parent 049d1b8 commit 7b172da

File tree

5 files changed

+49
-5
lines changed

5 files changed

+49
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v0.9.25-stable
2+
3+
add circle position support.
4+
15
# v0.9.24-stable
26

37
optimize performance overlay.

README.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ insult him.
5959
15. wrapper constraints
6060
16. staggered grid、grid、list(list is a special staggered grid, grid is also a special staggered
6161
grid)
62+
17. circle position
6263

6364
Coming 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
9293
dependencies:
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

658698
1. When the layout is complex, if the child elements need to be repainted frequently, it is

circle_position.webp

3.7 KB
Loading

example/circle_position.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
),

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_constraintlayout
22
description: 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
44
anthor: hackware
55
homepage: https://github.com/hackware1993/Flutter-ConstraintLayout
66

0 commit comments

Comments
 (0)