SemanticsComponent constructor

SemanticsComponent({
  1. String? label,
  2. String? value,
  3. String? hint,
  4. bool button = false,
  5. VoidCallback? onTap,
  6. VoidCallback? onLongPress,
  7. VoidCallback? onIncrease,
  8. VoidCallback? onDecrease,
  9. VoidCallback? onDidGainAccessibilityFocus,
  10. VoidCallback? onDidLoseAccessibilityFocus,
  11. double? sortOrder,
  12. TextDirection? textDirection,
  13. bool occlusionHiding = false,
  14. Aabb3? boundsOverride,
  15. SemanticsProperties? properties,
})

Creates semantics for the owning node.

Pass either the convenience parameters or a full properties object, not both.

Implementation

SemanticsComponent({
  String? label,
  String? value,
  String? hint,
  bool button = false,
  VoidCallback? onTap,
  VoidCallback? onLongPress,
  VoidCallback? onIncrease,
  VoidCallback? onDecrease,
  VoidCallback? onDidGainAccessibilityFocus,
  VoidCallback? onDidLoseAccessibilityFocus,
  double? sortOrder,
  TextDirection? textDirection,
  bool occlusionHiding = false,
  vm.Aabb3? boundsOverride,
  SemanticsProperties? properties,
}) : assert(
       properties == null ||
           (label == null &&
               value == null &&
               hint == null &&
               !button &&
               onTap == null &&
               onLongPress == null &&
               onIncrease == null &&
               onDecrease == null &&
               onDidGainAccessibilityFocus == null &&
               onDidLoseAccessibilityFocus == null &&
               sortOrder == null &&
               textDirection == null),
       'Pass either the convenience parameters or a full properties '
       'object, not both.',
     ),
     _label = label,
     _value = value,
     _hint = hint,
     _button = button,
     _onTap = onTap,
     _onLongPress = onLongPress,
     _onIncrease = onIncrease,
     _onDecrease = onDecrease,
     _onDidGainAccessibilityFocus = onDidGainAccessibilityFocus,
     _onDidLoseAccessibilityFocus = onDidLoseAccessibilityFocus,
     _sortOrder = sortOrder,
     _textDirection = textDirection,
     _occlusionHiding = occlusionHiding,
     _boundsOverride = boundsOverride,
     _properties = properties;