File tree Expand file tree Collapse file tree 6 files changed +24
-53
lines changed Expand file tree Collapse file tree 6 files changed +24
-53
lines changed Original file line number Diff line number Diff line change
1
+ # v1.4.2-stable
2
+
3
+ fix a rotate bug.
4
+
1
5
# v1.4.1-stable
2
6
3
- 1 . add pinned & circle translate support.
7
+ add pinned & circle translate support.
4
8
5
9
# v1.4.0-stable
6
10
Original file line number Diff line number Diff line change @@ -185,12 +185,12 @@ dependencies:
185
185
flutter_constraintlayout :
186
186
git :
187
187
url : ' https://github.com/hackware1993/Flutter-ConstraintLayout.git'
188
- ref : ' v1.4.1 -stable'
188
+ ref : ' v1.4.2 -stable'
189
189
` ` `
190
190
191
191
` ` ` yaml
192
192
dependencies :
193
- flutter_constraintlayout : ^1.4.1 -stable
193
+ flutter_constraintlayout : ^1.4.2 -stable
194
194
` ` `
195
195
196
196
` ` ` dart
@@ -1072,12 +1072,9 @@ class TranslateExampleState extends State<TranslateExample> {
1072
1072
centerTo: parent,
1073
1073
),
1074
1074
Container(
1075
- decoration: const BoxDecoration(
1076
- color: Colors.red,
1077
- ),
1075
+ color: Colors.red,
1078
1076
child: const Text('pinned translate'),
1079
1077
).applyConstraint(
1080
- size: wrapContent,
1081
1078
centerTo: anchor,
1082
1079
translate: PinnedTranslate(
1083
1080
PinnedInfo(
@@ -1089,9 +1086,7 @@ class TranslateExampleState extends State<TranslateExample> {
1089
1086
),
1090
1087
),
1091
1088
Container(
1092
- decoration: const BoxDecoration(
1093
- color: Colors.blue,
1094
- ),
1089
+ color: Colors.blue,
1095
1090
child: const Text('circle translate'),
1096
1091
).applyConstraint(
1097
1092
size: wrapContent,
@@ -1102,12 +1097,9 @@ class TranslateExampleState extends State<TranslateExample> {
1102
1097
),
1103
1098
),
1104
1099
Container(
1105
- decoration: const BoxDecoration(
1106
- color: Colors.cyan,
1107
- ),
1100
+ color: Colors.cyan,
1108
1101
child: const Text('pinned & circle translate'),
1109
1102
).applyConstraint(
1110
- size: wrapContent,
1111
1103
centerTo: anchor,
1112
1104
translate: PinnedTranslate(
1113
1105
PinnedInfo(
@@ -1123,9 +1115,7 @@ class TranslateExampleState extends State<TranslateExample> {
1123
1115
),
1124
1116
),
1125
1117
Container(
1126
- decoration: const BoxDecoration(
1127
- color: Colors.orange,
1128
- ),
1118
+ color: Colors.orange,
1129
1119
child: const Text('normal translate'),
1130
1120
).applyConstraint(
1131
1121
size: wrapContent,
Original file line number Diff line number Diff line change @@ -159,12 +159,12 @@ dependencies:
159
159
flutter_constraintlayout :
160
160
git :
161
161
url : ' https://github.com/hackware1993/Flutter-ConstraintLayout.git'
162
- ref : ' v1.4.1 -stable'
162
+ ref : ' v1.4.2 -stable'
163
163
` ` `
164
164
165
165
` ` ` yaml
166
166
dependencies :
167
- flutter_constraintlayout : ^1.4.1 -stable
167
+ flutter_constraintlayout : ^1.4.2 -stable
168
168
` ` `
169
169
170
170
` ` ` dart
@@ -1046,12 +1046,9 @@ class TranslateExampleState extends State<TranslateExample> {
1046
1046
centerTo: parent,
1047
1047
),
1048
1048
Container(
1049
- decoration: const BoxDecoration(
1050
- color: Colors.red,
1051
- ),
1049
+ color: Colors.red,
1052
1050
child: const Text('pinned translate'),
1053
1051
).applyConstraint(
1054
- size: wrapContent,
1055
1052
centerTo: anchor,
1056
1053
translate: PinnedTranslate(
1057
1054
PinnedInfo(
@@ -1063,9 +1060,7 @@ class TranslateExampleState extends State<TranslateExample> {
1063
1060
),
1064
1061
),
1065
1062
Container(
1066
- decoration: const BoxDecoration(
1067
- color: Colors.blue,
1068
- ),
1063
+ color: Colors.blue,
1069
1064
child: const Text('circle translate'),
1070
1065
).applyConstraint(
1071
1066
size: wrapContent,
@@ -1076,12 +1071,9 @@ class TranslateExampleState extends State<TranslateExample> {
1076
1071
),
1077
1072
),
1078
1073
Container(
1079
- decoration: const BoxDecoration(
1080
- color: Colors.cyan,
1081
- ),
1074
+ color: Colors.cyan,
1082
1075
child: const Text('pinned & circle translate'),
1083
1076
).applyConstraint(
1084
- size: wrapContent,
1085
1077
centerTo: anchor,
1086
1078
translate: PinnedTranslate(
1087
1079
PinnedInfo(
@@ -1097,9 +1089,7 @@ class TranslateExampleState extends State<TranslateExample> {
1097
1089
),
1098
1090
),
1099
1091
Container(
1100
- decoration: const BoxDecoration(
1101
- color: Colors.orange,
1102
- ),
1092
+ color: Colors.orange,
1103
1093
child: const Text('normal translate'),
1104
1094
).applyConstraint(
1105
1095
size: wrapContent,
Original file line number Diff line number Diff line change @@ -51,12 +51,9 @@ class TranslateExampleState extends State<TranslateExample> {
51
51
centerTo: parent,
52
52
),
53
53
Container (
54
- decoration: const BoxDecoration (
55
- color: Colors .red,
56
- ),
54
+ color: Colors .red,
57
55
child: const Text ('pinned translate' ),
58
56
).applyConstraint (
59
- size: wrapContent,
60
57
centerTo: anchor,
61
58
translate: PinnedTranslate (
62
59
PinnedInfo (
@@ -68,9 +65,7 @@ class TranslateExampleState extends State<TranslateExample> {
68
65
),
69
66
),
70
67
Container (
71
- decoration: const BoxDecoration (
72
- color: Colors .blue,
73
- ),
68
+ color: Colors .blue,
74
69
child: const Text ('circle translate' ),
75
70
).applyConstraint (
76
71
size: wrapContent,
@@ -81,12 +76,9 @@ class TranslateExampleState extends State<TranslateExample> {
81
76
),
82
77
),
83
78
Container (
84
- decoration: const BoxDecoration (
85
- color: Colors .cyan,
86
- ),
79
+ color: Colors .cyan,
87
80
child: const Text ('pinned & circle translate' ),
88
81
).applyConstraint (
89
- size: wrapContent,
90
82
centerTo: anchor,
91
83
translate: PinnedTranslate (
92
84
PinnedInfo (
@@ -102,9 +94,7 @@ class TranslateExampleState extends State<TranslateExample> {
102
94
),
103
95
),
104
96
Container (
105
- decoration: const BoxDecoration (
106
- color: Colors .orange,
107
- ),
97
+ color: Colors .orange,
108
98
child: const Text ('normal translate' ),
109
99
).applyConstraint (
110
100
size: wrapContent,
Original file line number Diff line number Diff line change @@ -3271,11 +3271,8 @@ class _ConstraintRenderBox extends RenderBox
3271
3271
context.canvas.translate (
3272
3272
element.offset.dx + offset.dx + paintShift.dx + anchorOffset.dx,
3273
3273
element.offset.dy + offset.dy + paintShift.dy + anchorOffset.dy);
3274
- context.canvas.rotate (pi + pi * (pinnedInfo.angle / 180 ));
3275
- context.paintChild (
3276
- element.renderBox! ,
3277
- Offset (- element.getMeasuredWidth () + anchorOffset.dx,
3278
- - element.getMeasuredHeight () + anchorOffset.dy));
3274
+ context.canvas.rotate (pinnedInfo.angle * pi / 180 );
3275
+ context.paintChild (element.renderBox! , - anchorOffset);
3279
3276
context.canvas.restore ();
3280
3277
} else {
3281
3278
context.paintChild (
Original file line number Diff line number Diff line change 1
1
name : flutter_constraintlayout
2
2
description : A super powerful Stack, build flexible layouts with constraints. Similar to ConstraintLayout for Android and AutoLayout for iOS.
3
- version : 1.4.1 -stable
3
+ version : 1.4.2 -stable
4
4
anthor : hackware
5
5
homepage : https://github.com/hackware1993/Flutter-ConstraintLayout
6
6
You can’t perform that action at this time.
0 commit comments