Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

SemanticsUpdateBuilder: make all args non-null #49148

Merged
merged 3 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/ui/fixtures/ui_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ void sendSemanticsUpdate() {
),
];

String tooltip = "tooltip";

final Float64List transform = Float64List(16);
final Int32List childrenInTraversalOrder = Int32List(0);
final Int32List childrenInHitTestOrder = Int32List(0);
Expand Down Expand Up @@ -224,6 +226,7 @@ void sendSemanticsUpdate() {
decreasedValueAttributes: decreasedValueAttributes,
hint: hint,
hintAttributes: hintAttributes,
tooltip: tooltip,
textDirection: TextDirection.ltr,
transform: transform,
childrenInTraversalOrder: childrenInTraversalOrder,
Expand Down
10 changes: 5 additions & 5 deletions lib/ui/semantics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,8 @@ abstract class SemanticsUpdateBuilder {
required List<StringAttribute> decreasedValueAttributes,
required String hint,
required List<StringAttribute> hintAttributes,
String? tooltip,
TextDirection? textDirection,
required String tooltip,
required TextDirection? textDirection,
required Float64List transform,
required Int32List childrenInTraversalOrder,
required Int32List childrenInHitTestOrder,
Expand Down Expand Up @@ -888,8 +888,8 @@ base class _NativeSemanticsUpdateBuilder extends NativeFieldWrapperClass1 implem
required List<StringAttribute> decreasedValueAttributes,
required String hint,
required List<StringAttribute> hintAttributes,
String? tooltip,
TextDirection? textDirection,
required String tooltip,
required TextDirection? textDirection,
required Float64List transform,
required Int32List childrenInTraversalOrder,
required Int32List childrenInHitTestOrder,
Expand Down Expand Up @@ -927,7 +927,7 @@ base class _NativeSemanticsUpdateBuilder extends NativeFieldWrapperClass1 implem
decreasedValueAttributes,
hint,
hintAttributes,
tooltip ?? '',
tooltip,
textDirection != null ? textDirection.index + 1 : 0,
transform,
childrenInTraversalOrder,
Expand Down
5 changes: 5 additions & 0 deletions shell/platform/embedder/fixtures/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ Future<void> a11y_main() async {
decreasedValue: '',
decreasedValueAttributes: <StringAttribute>[],
tooltip: 'tooltip',
textDirection: TextDirection.ltr,
additionalActions: Int32List(0),
)
..updateNode(
Expand Down Expand Up @@ -199,6 +200,7 @@ Future<void> a11y_main() async {
decreasedValue: '',
decreasedValueAttributes: <StringAttribute>[],
tooltip: 'tooltip',
textDirection: TextDirection.ltr,
additionalActions: Int32List(0),
childrenInHitTestOrder: Int32List(0),
childrenInTraversalOrder: Int32List(0),
Expand Down Expand Up @@ -235,6 +237,7 @@ Future<void> a11y_main() async {
decreasedValue: '',
decreasedValueAttributes: <StringAttribute>[],
tooltip: 'tooltip',
textDirection: TextDirection.ltr,
additionalActions: Int32List(0),
)
..updateNode(
Expand Down Expand Up @@ -268,6 +271,7 @@ Future<void> a11y_main() async {
decreasedValue: '',
decreasedValueAttributes: <StringAttribute>[],
tooltip: 'tooltip',
textDirection: TextDirection.ltr,
childrenInHitTestOrder: Int32List(0),
childrenInTraversalOrder: Int32List(0),
)
Expand Down Expand Up @@ -364,6 +368,7 @@ Future<void> a11y_string_attributes() async {
decreasedValue: '41',
decreasedValueAttributes: <StringAttribute>[],
tooltip: 'tooltip',
textDirection: TextDirection.ltr,
additionalActions: Int32List(0),
);

Expand Down