SemanticsComponent constructor
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,
- Aabb3? boundsOverride,
- 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;