SemanticsData constructor

const SemanticsData({@required int flags, @required int actions, @required String label, @required String increasedValue, @required String value, @required String decreasedValue, @required String hint, @required TextDirection textDirection, @required Rect rect, @required TextSelection textSelection, @required int scrollIndex, @required int scrollChildCount, @required double scrollPosition, @required double scrollExtentMax, @required double scrollExtentMin, Set<SemanticsTag> tags, Matrix4 transform, List<int> customSemanticsActionIds })

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);