Skip to content

Commit f5b5894

Browse files
author
fbchen
committed
optimize child index
1 parent f8c6f0d commit f5b5894

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/constrait_layout/constraint_layout.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ class Constrained extends ParentDataWidget<_ConstraintBoxData> {
191191
final bool centerHorizontal;
192192
final bool centerVertical;
193193

194-
final int zIndex;
194+
final int? zIndex;
195195
final Offset translate;
196196
final bool translateDependency;
197197

@@ -228,7 +228,7 @@ class Constrained extends ParentDataWidget<_ConstraintBoxData> {
228228
this.centerVertical = false,
229229
this.horizontalBias = 0.5,
230230
this.verticalBias = 0.5,
231-
this.zIndex = 0,
231+
this.zIndex, // default is child index
232232
this.translate = Offset.zero,
233233
this.translateDependency = false,
234234
}) : super(

0 commit comments

Comments
 (0)