Add indexInParent to SemanticsNode debug information (#142826)
https://github.com/flutter/flutter/issues/93232
This commit is contained in:
committed by
GitHub
parent
01f81b322c
commit
0202e3bf7a
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user