Unverified Commit 0202e3bf authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Add indexInParent to SemanticsNode debug information (#142826)

https://github.com/flutter/flutter/issues/93232
parent 01f81b32
......@@ -2959,6 +2959,7 @@ class SemanticsNode with DiagnosticableTreeMixin {
properties.add(DoubleProperty('scrollExtentMin', scrollExtentMin, defaultValue: null));
properties.add(DoubleProperty('scrollPosition', scrollPosition, defaultValue: null));
properties.add(DoubleProperty('scrollExtentMax', scrollExtentMax, defaultValue: null));
properties.add(IntProperty('indexInParent', indexInParent, defaultValue: null));
properties.add(DoubleProperty('elevation', elevation, defaultValue: 0.0));
properties.add(DoubleProperty('thickness', thickness, defaultValue: 0.0));
}
......
......@@ -699,6 +699,7 @@ void main() {
' scrollExtentMin: null\n'
' scrollPosition: null\n'
' scrollExtentMax: null\n'
' indexInParent: null\n'
' elevation: 0.0\n'
' thickness: 0.0\n',
);
......@@ -823,6 +824,7 @@ void main() {
' scrollExtentMin: null\n'
' scrollPosition: null\n'
' scrollExtentMax: null\n'
' indexInParent: null\n'
' elevation: 0.0\n'
' thickness: 0.0\n',
);
......@@ -978,6 +980,10 @@ void main() {
);
});
test('SemanticsNode.indexInParent appears in string output', () async {
final SemanticsNode node = SemanticsNode()..indexInParent = 10;
expect(node.toString(), contains('indexInParent: 10'));
});
}
class TestRender extends RenderProxyBox {
......
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