SemanticsData constructor
Creates a semantics data object.
The flags
, actions
, label
, and Rect arguments must not be null.
If label
is not empty, then textDirection
must also not be null.
Implementation
const SemanticsData({
@required this.flags,
@required this.actions,
@required this.label,
@required this.increasedValue,
@required this.value,
@required this.decreasedValue,
@required this.hint,
@required this.textDirection,
@required this.rect,
@required this.textSelection,
@required this.scrollIndex,
@required this.scrollChildCount,
@required this.scrollPosition,
@required this.scrollExtentMax,
@required this.scrollExtentMin,
this.tags,
this.transform,
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(rect != null);