Skip to content

Commit 7c95312

Browse files
committed
update readme
1 parent 870f4e4 commit 7c95312

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

README.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,21 @@ class NestedHell extends StatelessWidget {
8484
9. baselineToTop
8585
10. baselineToBottom
8686
11. baselineToBaseline
87-
2. margin and goneMargin
88-
3. clickPadding (quickly expand the click area of child elements without changing their actual size.
89-
This means that the click area can be shared between child elements without increasing nesting.
90-
Sometimes it may be necessary to combine with e-index)
87+
2. margin and goneMargin(when the visibility of the dependent element is gone or the actual size of
88+
one side is 0, the goneMargin will take effect, otherwise the margin will take effect, even if
89+
its own visibility is gone)
90+
3. clickPadding(quickly expand the click area of child elements without changing their actual size.
91+
This means that you can completely follow the layout of the UI prototype without having to think
92+
about the click area of the element. This also means that the click area can be shared between
93+
child elements without increasing nesting. Sometimes it may be necessary to combine with e-index)
9194
4. visibility control
9295
1. visible
9396
2. invisible
94-
3. gone
97+
3. gone(sometimes it may be better to use a conditional expression to keep the element from
98+
being created)
9599
5. constraint integrity hint
96-
6. bias
100+
6. bias(when there are constraints left and right or up and down, horizontalBias and verticalBias
101+
can be used to adjust the offset. The default value is 0.5, which means centering)
97102
7. z-index(drawing order, default is child index)
98103
8. translate
99104
9. percentage layout(when size is set to matchConstraint, the percentage layout will take effect,
@@ -103,6 +108,11 @@ class NestedHell extends StatelessWidget {
103108
11. constraints and widgets separation
104109
12. barrier
105110
13. dimension ratio
111+
1. widthHeightRatio: 1 / 3,
112+
2. ratioBaseOnWidth: true, (the default value is null, which means automatic inference. The size
113+
of the undetermined side will be calculated using the determined side based on the aspect
114+
ratio. The undetermined side must be matchConstraint, and the determined side can be
115+
matchParent, fixed size(>=0), matchConstraint)
106116
14. relative id
107117
1. rId(3) represents the 3th child element, and so on
108118
2. sId(-1) represents the previous sibling element, and so on

0 commit comments

Comments
 (0)