/// Summary information about a [SemanticsNode] object.
///
/// A semantics node might [SemanticsNode.mergeAllDescendantsIntoThisNode],
...
...
@@ -185,14 +270,14 @@ class SemanticsData with Diagnosticable {
/// The [flags], [actions], [label], and [Rect] arguments must not be null.
///
/// If [label] is not empty, then [textDirection] must also not be null.
constSemanticsData({
SemanticsData({
requiredthis.flags,
requiredthis.actions,
requiredthis.label,
requiredthis.increasedValue,
requiredthis.value,
requiredthis.decreasedValue,
requiredthis.hint,
requiredthis.attributedLabel,
requiredthis.attributedValue,
requiredthis.attributedIncreasedValue,
requiredthis.attributedDecreasedValue,
requiredthis.attributedHint,
requiredthis.textDirection,
requiredthis.rect,
requiredthis.elevation,
...
...
@@ -211,16 +296,16 @@ class SemanticsData with Diagnosticable {
this.customSemanticsActionIds,
}):assert(flags!=null),
assert(actions!=null),
assert(label!=null),
assert(value!=null),
assert(decreasedValue!=null),
assert(increasedValue!=null),
assert(hint!=null),
assert(label==''||textDirection!=null,'A SemanticsData object with label "$label" had a null textDirection.'),
assert(value==''||textDirection!=null,'A SemanticsData object with value "$value" had a null textDirection.'),
assert(hint==''||textDirection!=null,'A SemanticsData object with hint "$hint" had a null textDirection.'),
assert(decreasedValue==''||textDirection!=null,'A SemanticsData object with decreasedValue "$decreasedValue" had a null textDirection.'),
assert(increasedValue==''||textDirection!=null,'A SemanticsData object with increasedValue "$increasedValue" had a null textDirection.'),
assert(attributedLabel!=null),
assert(attributedValue!=null),
assert(attributedDecreasedValue!=null),
assert(attributedIncreasedValue!=null),
assert(attributedHint!=null),
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(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(attributedIncreasedValue.string==''||textDirection!=null,'A SemanticsData object with increasedValue "${attributedIncreasedValue.string}" had a null textDirection.'),
assert(rect!=null);
/// A bit field of [SemanticsFlag]s that apply to this node.
...
...
@@ -229,32 +314,62 @@ class SemanticsData with Diagnosticable {
/// A bit field of [SemanticsAction]s that apply to this node.
finalintactions;
/// A textual description of this node.
/// A textual description for the current label of the node.
///
/// The reading direction is given by [textDirection].
finalStringlabel;
Stringgetlabel=>attributedLabel.string;
/// A textual description for the current label of the node in
/// [AttributedString] format.
///
/// The reading direction is given by [textDirection].
finalAttributedStringattributedLabel;
/// A textual description for the current value of the node.
///
/// The reading direction is given by [textDirection].
finalStringvalue;
Stringgetvalue=>attributedValue.string;
/// A textual description for the current value of the node in
/// [AttributedString] format.
///
/// The reading direction is given by [textDirection].
finalAttributedStringattributedValue;
/// The value that [value] will become after performing a
/// [SemanticsAction.increase] action.
///
/// The reading direction is given by [textDirection].