diff --git a/packages/flutter/lib/src/semantics/semantics.dart b/packages/flutter/lib/src/semantics/semantics.dart index 34b0731d5a..ff3287bfa6 100644 --- a/packages/flutter/lib/src/semantics/semantics.dart +++ b/packages/flutter/lib/src/semantics/semantics.dart @@ -1656,7 +1656,7 @@ class SemanticsProperties extends DiagnosticableTree { properties.add(DiagnosticsProperty('mixed', mixed, defaultValue: null)); properties.add(DiagnosticsProperty('expanded', expanded, defaultValue: null)); properties.add(DiagnosticsProperty('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, defaultValue: null)); properties.add(DiagnosticsProperty('sortKey', sortKey, defaultValue: null)); properties.add(DiagnosticsProperty('hintOverrides', hintOverrides, defaultValue: null)); diff --git a/packages/flutter/test/semantics/semantics_update_test.dart b/packages/flutter/test/semantics/semantics_update_test.dart index 0b18282c3a..e1002e585c 100644 --- a/packages/flutter/test/semantics/semantics_update_test.dart +++ b/packages/flutter/test/semantics/semantics_update_test.dart @@ -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 ')', );