SemanticsProperties: default identifier and tooltip to null (#140283)
This PR applies [the suggestion made here](https://github.com/flutter/devtools/pull/6942#issuecomment-1852773200).
This commit is contained in:
@@ -1656,7 +1656,7 @@ class SemanticsProperties extends DiagnosticableTree {
|
||||
properties.add(DiagnosticsProperty<bool>('mixed', mixed, defaultValue: null));
|
||||
properties.add(DiagnosticsProperty<bool>('expanded', expanded, defaultValue: null));
|
||||
properties.add(DiagnosticsProperty<bool>('selected', selected, defaultValue: null));
|
||||
properties.add(StringProperty('identifier', identifier));
|
||||
properties.add(StringProperty('identifier', identifier, defaultValue: null));
|
||||
properties.add(StringProperty('label', label, defaultValue: null));
|
||||
properties.add(AttributedStringProperty('attributedLabel', attributedLabel, defaultValue: null));
|
||||
properties.add(StringProperty('value', value, defaultValue: null));
|
||||
@@ -1667,7 +1667,7 @@ class SemanticsProperties extends DiagnosticableTree {
|
||||
properties.add(AttributedStringProperty('attributedDecreasedValue', attributedDecreasedValue, defaultValue: null));
|
||||
properties.add(StringProperty('hint', hint, defaultValue: null));
|
||||
properties.add(AttributedStringProperty('attributedHint', attributedHint, defaultValue: null));
|
||||
properties.add(StringProperty('tooltip', tooltip));
|
||||
properties.add(StringProperty('tooltip', tooltip, defaultValue: null));
|
||||
properties.add(EnumProperty<TextDirection>('textDirection', textDirection, defaultValue: null));
|
||||
properties.add(DiagnosticsProperty<SemanticsSortKey>('sortKey', sortKey, defaultValue: null));
|
||||
properties.add(DiagnosticsProperty<SemanticsHintOverrides>('hintOverrides', hintOverrides, defaultValue: null));
|
||||
|
||||
@@ -156,11 +156,9 @@ void main() {
|
||||
'Semantics('
|
||||
'container: false, '
|
||||
'properties: SemanticsProperties, '
|
||||
'identifier: null, '// ignore: missing_whitespace_between_adjacent_strings
|
||||
'attributedLabel: "label" [SpellOutStringAttribute(TextRange(start: 0, end: 5))], '
|
||||
'attributedValue: "value" [LocaleStringAttribute(TextRange(start: 0, end: 5), en-MX)], '
|
||||
'attributedHint: "hint" [SpellOutStringAttribute(TextRange(start: 1, end: 2))], '
|
||||
'tooltip: null'// ignore: missing_whitespace_between_adjacent_strings
|
||||
'attributedHint: "hint" [SpellOutStringAttribute(TextRange(start: 1, end: 2))]'// ignore: missing_whitespace_between_adjacent_strings
|
||||
')',
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user