Unverified Commit 3bf1bde9 authored by Varun Kamani's avatar Varun Kamani Committed by GitHub

typo fixed in Wrap.debugFillProperties for crossAxisAlignment (#89436)

parent e45aa895
......@@ -5293,7 +5293,7 @@ class Wrap extends MultiChildRenderObjectWidget {
properties.add(DoubleProperty('spacing', spacing));
properties.add(EnumProperty<WrapAlignment>('runAlignment', runAlignment));
properties.add(DoubleProperty('runSpacing', runSpacing));
properties.add(DoubleProperty('crossAxisAlignment', runSpacing));
properties.add(EnumProperty<WrapCrossAlignment>('crossAxisAlignment', crossAxisAlignment));
properties.add(EnumProperty<TextDirection>('textDirection', textDirection, defaultValue: null));
properties.add(EnumProperty<VerticalDirection>('verticalDirection', verticalDirection, defaultValue: VerticalDirection.down));
}
......
......@@ -863,6 +863,41 @@ void main() {
expect(logs, <String>['exit3']);
logs.clear();
});
testWidgets('Wrap implements debugFillProperties', (WidgetTester tester) async {
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
Wrap(
spacing: 8.0, // gap between adjacent Text widget
runSpacing: 4.0, // gap between lines
direction: Axis.horizontal,
alignment: WrapAlignment.start,
runAlignment: WrapAlignment.start,
crossAxisAlignment: WrapCrossAlignment.start,
textDirection: TextDirection.ltr,
verticalDirection: VerticalDirection.up,
children: const <Widget>[
Text('Hamilton'),
Text('Lafayette'),
Text('Mulligan'),
],
).debugFillProperties(builder);
final List<String> description = builder.properties
.where((DiagnosticsNode node) => !node.isFiltered(DiagnosticLevel.info))
.map((DiagnosticsNode node) => node.toString())
.toList();
expect(description, unorderedMatches(<dynamic>[
contains('direction: horizontal'),
contains('alignment: start'),
contains('spacing: 8.0'),
contains('runAlignment: start'),
contains('runSpacing: 4.0'),
contains('crossAxisAlignment: start'),
contains('textDirection: ltr'),
contains('verticalDirection: up'),
]));
});
}
HitsRenderBox hits(RenderBox renderBox) => HitsRenderBox(renderBox);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment