-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)c: contributor-productivityTeam-specific productivity, code health, technical debt.Team-specific productivity, code health, technical debt.engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
SemanticsUpdateBuilder.updateNode() currently expects that all of its parameters be set despite the fact that it's not a native call. We should consider applying most of the defaulting we do in lib/src/semantics/semantics.dart on the dart:ui side.
Current updateNode definition:
void updateNode({
/*required*/ int/*!*/ id,
/*required*/ int/*!*/ flags,
/*required*/ int/*!*/ actions,
/*required*/ int/*!*/ maxValueLength,
/*required*/ int/*!*/ currentValueLength,
/*required*/ int/*!*/ textSelectionBase,
/*required*/ int/*!*/ textSelectionExtent,
/*required*/ int/*!*/ platformViewId,
/*required*/ int/*!*/ scrollChildren,
/*required*/ int/*!*/ scrollIndex,
/*required*/ double/*!*/ scrollPosition,
/*required*/ double/*!*/ scrollExtentMax,
/*required*/ double/*!*/ scrollExtentMin,
/*required*/ double/*!*/ elevation,
/*required*/ double/*!*/ thickness,
/*required*/ Rect/*!*/ rect,
/*required*/ String/*!*/ label,
/*required*/ String/*!*/ hint,
/*required*/ String/*!*/ value,
/*required*/ String/*!*/ increasedValue,
/*required*/ String/*!*/ decreasedValue,
TextDirection/*?*/ textDirection,
/*required*/ Float64List/*!*/ transform,
/*required*/ Int32List/*!*/ childrenInTraversalOrder,
/*required*/ Int32List/*!*/ childrenInHitTestOrder,
/*required*/ Int32List/*!*/ additionalActions,
}) {
Current framework defaulting at the call site:
builder.updateNode(
id: id,
flags: data.flags,
actions: data.actions,
rect: data.rect,
label: data.label,
value: data.value,
decreasedValue: data.decreasedValue,
increasedValue: data.increasedValue,
hint: data.hint,
textDirection: data.textDirection,
textSelectionBase: data.textSelection != null ? data.textSelection.baseOffset : -1,
textSelectionExtent: data.textSelection != null ? data.textSelection.extentOffset : -1,
platformViewId: data.platformViewId ?? -1,
maxValueLength: data.maxValueLength ?? -1,
currentValueLength: data.currentValueLength ?? -1,
scrollChildren: data.scrollChildCount ?? 0,
scrollIndex: data.scrollIndex ?? 0 ,
scrollPosition: data.scrollPosition ?? double.nan,
scrollExtentMax: data.scrollExtentMax ?? double.nan,
scrollExtentMin: data.scrollExtentMin ?? double.nan,
transform: data.transform?.storage ?? _kIdentityTransform,
elevation: data.elevation,
thickness: data.thickness,
childrenInTraversalOrder: childrenInTraversalOrder,
childrenInHitTestOrder: childrenInHitTestOrder,
additionalActions: customSemanticsActionIds ?? _kEmptyCustomSemanticsActionsList,
);
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)c: contributor-productivityTeam-specific productivity, code health, technical debt.Team-specific productivity, code health, technical debt.engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team