// This follows a similar pattern to StringProperty.
text=text.replaceAll('\n',r'\n');
}
if(value!.attributes.isEmpty){
return'"$text"';
}
return'"$text" ${value!.attributes}';// the attributes will be in square brackets since they're a list
}
}
/// Summary information about a [SemanticsNode] object.
/// Summary information about a [SemanticsNode] object.
///
///
/// A semantics node might [SemanticsNode.mergeAllDescendantsIntoThisNode],
/// A semantics node might [SemanticsNode.mergeAllDescendantsIntoThisNode],
...
@@ -303,9 +354,9 @@ class SemanticsData with Diagnosticable {
...
@@ -303,9 +354,9 @@ class SemanticsData with Diagnosticable {
assert(attributedHint!=null),
assert(attributedHint!=null),
assert(attributedLabel.string==''||textDirection!=null,'A SemanticsData object with label "${attributedLabel.string}" had a null textDirection.'),
assert(attributedLabel.string==''||textDirection!=null,'A SemanticsData object with label "${attributedLabel.string}" had a null textDirection.'),
assert(attributedValue.string==''||textDirection!=null,'A SemanticsData object with value "${attributedValue.string}" had a null textDirection.'),
assert(attributedValue.string==''||textDirection!=null,'A SemanticsData object with value "${attributedValue.string}" had a null textDirection.'),
assert(attributedHint.string==''||textDirection!=null,'A SemanticsData object with hint "${attributedHint.string}" had a null textDirection.'),
assert(attributedDecreasedValue.string==''||textDirection!=null,'A SemanticsData object with decreasedValue "${attributedDecreasedValue.string}" had a null textDirection.'),
assert(attributedDecreasedValue.string==''||textDirection!=null,'A SemanticsData object with decreasedValue "${attributedDecreasedValue.string}" had a null textDirection.'),
assert(attributedIncreasedValue.string==''||textDirection!=null,'A SemanticsData object with increasedValue "${attributedIncreasedValue.string}" had a null textDirection.'),
assert(attributedIncreasedValue.string==''||textDirection!=null,'A SemanticsData object with increasedValue "${attributedIncreasedValue.string}" had a null textDirection.'),
assert(attributedHint.string==''||textDirection!=null,'A SemanticsData object with hint "${attributedHint.string}" had a null textDirection.'),
assert(rect!=null);
assert(rect!=null);
/// A bit field of [SemanticsFlag]s that apply to this node.
/// A bit field of [SemanticsFlag]s that apply to this node.
...
@@ -317,62 +368,82 @@ class SemanticsData with Diagnosticable {
...
@@ -317,62 +368,82 @@ class SemanticsData with Diagnosticable {
/// A textual description for the current label of the node.
/// A textual description for the current label of the node.
///
///
/// The reading direction is given by [textDirection].
/// The reading direction is given by [textDirection].
///
/// This exposes the raw text of the [attributedLabel].
Stringgetlabel=>attributedLabel.string;
Stringgetlabel=>attributedLabel.string;
/// A textual description for the current label of the node in
/// A textual description for the current label of the node in
/// [AttributedString] format.
/// [AttributedString] format.
///
///
/// The reading direction is given by [textDirection].
/// The reading direction is given by [textDirection].
///
/// See also [label], which exposes just the raw text.
finalAttributedStringattributedLabel;
finalAttributedStringattributedLabel;
/// A textual description for the current value of the node.
/// A textual description for the current value of the node.
///
///
/// The reading direction is given by [textDirection].
/// The reading direction is given by [textDirection].
///
/// This exposes the raw text of the [attributedValue].
Stringgetvalue=>attributedValue.string;
Stringgetvalue=>attributedValue.string;
/// A textual description for the current value of the node in
/// A textual description for the current value of the node in
/// [AttributedString] format.
/// [AttributedString] format.
///
///
/// The reading direction is given by [textDirection].
/// The reading direction is given by [textDirection].
///
/// See also [value], which exposes just the raw text.
finalAttributedStringattributedValue;
finalAttributedStringattributedValue;
/// The value that [value] will become after performing a
/// The value that [value] will become after performing a
/// [SemanticsAction.increase] action.
/// [SemanticsAction.increase] action.
///
///
/// The reading direction is given by [textDirection].
/// The reading direction is given by [textDirection].
///
/// This exposes the raw text of the [attributedIncreasedValue].