SemanticsUpdateBuilder: make all args non-null (flutter/engine#49148)
This PR is inspired by [the suggestion made here](https://github.com/flutter/engine/pull/47961#discussion_r1406581284).
This commit is contained in:
@@ -173,6 +173,8 @@ void sendSemanticsUpdate() {
|
||||
),
|
||||
];
|
||||
|
||||
String tooltip = "tooltip";
|
||||
|
||||
final Float64List transform = Float64List(16);
|
||||
final Int32List childrenInTraversalOrder = Int32List(0);
|
||||
final Int32List childrenInHitTestOrder = Int32List(0);
|
||||
@@ -224,6 +226,7 @@ void sendSemanticsUpdate() {
|
||||
decreasedValueAttributes: decreasedValueAttributes,
|
||||
hint: hint,
|
||||
hintAttributes: hintAttributes,
|
||||
tooltip: tooltip,
|
||||
textDirection: TextDirection.ltr,
|
||||
transform: transform,
|
||||
childrenInTraversalOrder: childrenInTraversalOrder,
|
||||
|
||||
@@ -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,
|
||||
@@ -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,
|
||||
@@ -927,7 +927,7 @@ base class _NativeSemanticsUpdateBuilder extends NativeFieldWrapperClass1 implem
|
||||
decreasedValueAttributes,
|
||||
hint,
|
||||
hintAttributes,
|
||||
tooltip ?? '',
|
||||
tooltip,
|
||||
textDirection != null ? textDirection.index + 1 : 0,
|
||||
transform,
|
||||
childrenInTraversalOrder,
|
||||
|
||||
@@ -167,6 +167,7 @@ Future<void> a11y_main() async {
|
||||
decreasedValue: '',
|
||||
decreasedValueAttributes: <StringAttribute>[],
|
||||
tooltip: 'tooltip',
|
||||
textDirection: TextDirection.ltr,
|
||||
additionalActions: Int32List(0),
|
||||
)
|
||||
..updateNode(
|
||||
@@ -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),
|
||||
@@ -235,6 +237,7 @@ Future<void> a11y_main() async {
|
||||
decreasedValue: '',
|
||||
decreasedValueAttributes: <StringAttribute>[],
|
||||
tooltip: 'tooltip',
|
||||
textDirection: TextDirection.ltr,
|
||||
additionalActions: Int32List(0),
|
||||
)
|
||||
..updateNode(
|
||||
@@ -268,6 +271,7 @@ Future<void> a11y_main() async {
|
||||
decreasedValue: '',
|
||||
decreasedValueAttributes: <StringAttribute>[],
|
||||
tooltip: 'tooltip',
|
||||
textDirection: TextDirection.ltr,
|
||||
childrenInHitTestOrder: Int32List(0),
|
||||
childrenInTraversalOrder: Int32List(0),
|
||||
)
|
||||
@@ -364,6 +368,7 @@ Future<void> a11y_string_attributes() async {
|
||||
decreasedValue: '41',
|
||||
decreasedValueAttributes: <StringAttribute>[],
|
||||
tooltip: 'tooltip',
|
||||
textDirection: TextDirection.ltr,
|
||||
additionalActions: Int32List(0),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user