Fix bug in diagnostics for UnconstrainedBox class. (#27381)
This commit is contained in:
parent
b685a3ea82
commit
fac051c778
@ -2068,8 +2068,8 @@ class UnconstrainedBox extends SingleChildRenderObjectWidget {
|
|||||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||||
super.debugFillProperties(properties);
|
super.debugFillProperties(properties);
|
||||||
properties.add(DiagnosticsProperty<AlignmentGeometry>('alignment', alignment));
|
properties.add(DiagnosticsProperty<AlignmentGeometry>('alignment', alignment));
|
||||||
properties.add(DiagnosticsProperty<Axis>('constrainedAxis', null));
|
properties.add(EnumProperty<Axis>('constrainedAxis', constrainedAxis, defaultValue: null));
|
||||||
properties.add(DiagnosticsProperty<TextDirection>('textDirection', textDirection, defaultValue: null));
|
properties.add(EnumProperty<TextDirection>('textDirection', textDirection, defaultValue: null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,6 +145,17 @@ void main() {
|
|||||||
expect(_pointerDown, isTrue);
|
expect(_pointerDown, isTrue);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('UnconstrainedBox toString', () {
|
||||||
|
expect(
|
||||||
|
const UnconstrainedBox(constrainedAxis: Axis.vertical,).toString(),
|
||||||
|
equals('UnconstrainedBox(alignment: center, constrainedAxis: vertical)'),
|
||||||
|
);
|
||||||
|
expect(
|
||||||
|
const UnconstrainedBox(constrainedAxis: Axis.horizontal, textDirection: TextDirection.rtl, alignment: Alignment.topRight).toString(),
|
||||||
|
equals('UnconstrainedBox(alignment: topRight, constrainedAxis: horizontal, textDirection: rtl)'),
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
HitsRenderBox hits(RenderBox renderBox) => HitsRenderBox(renderBox);
|
HitsRenderBox hits(RenderBox renderBox) => HitsRenderBox(renderBox);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user