This adds geometric sort ordering back in for semantics nodes that don't have a sort order defined.
With this change, widgets that either have no sort order, or have an equivalent sort order, will be compared geometrically. The comparison is between the two starting corners, so it is TextDirection-aware: parent nodes that are set to have LTR text will compare upper left corners of their children, and upper right when set to RTL.
Also fixed a bug in the Transform widget that didn't mark modified nodes as needing a semantics update.
It seems that setTraversalBefore doesn't work as well as setTraversalAfter for some reason, although I'm using them the same way. Some apps would lock up TalkBack when traversing if setTraversalBefore was set, but not with the equivalent setTraversalAfter.
It's not entirely clear why this is, but I'm going with this to at least get it fixed for apps we know about.
Fixes#14600
* Roll engine to pre-dart roll
* Roll engine to pick up updated dart
* Apply Map changes
* Move to dev.22
* Fix some analysis issues
* Silent analyzer
* More consts
* More const massaging
* Yet more const massaging
* Yet more const massaging
* Use nonconst()
This allows const GlobalObjectKey(0) to be concisely formatted as
[GlobalObjectKey int#0000] in both Dart 2 and Dart 1 modes.
Without this change it would be formatted as
[GlobalObjectKey<State<StatefulWidget>> int#0000] because in Dart 2
types are instantiated to bounds.
In addition to retaining general readability this also fixes few
tests that rely on this short string representation (see
test/widgets/global_keys_duplicated_test.dart).
Channels don't preserve Map and List type arguments: Map<String, Object>
arrives as Map<dynamic, dynamic> to the receiver.
In Dart 2 type system dynamic no longer serves as bottom type so
Map<dynamic, dynamic> can't be assign to a variable of type
Map<String, dynamic>.
Issue #14556
* Use explicit types for onClick handler in diagnostics_test.
This test formats it to string and expects exact match.
Before this change onClick had type () => dynamic in Dart 1 and () => Null in
Dart 2.
* Fix strong mode issues in packages/flutter/test/material/dropdown_test.dart
Pass explicit type argument to renderObjectList(...) in expressions like
List<RenderBox> l = tester.renderObjectList(...).toList();
Dart 2 mode inference is not strong enough to infer RenderBox as a type argument
fto renderObjectList and passes RenderObject instead, which later leads to
runtime check failures (because List<RenderObject> is not List<RenderBox>).
* Fix strong mode issues in packages/flutter/test/material/theme_test.dart.
Pass type argument explicity to widgetList. Dart 2 type inference can't infer
it by itself.
* Fix strong mode issue packages/flutter/test/widgets/unique_widget_test.dart
Pass correct type argument to GlobalKey.
* Fix type annotation in packages/flutter/test/material/app_test.dart.
pushNamed returns Future<Object> not Future<String>.
This adds an API for defining the semantic node traversal order.
It adds a sortOrder argument to the Semantics widget, which is a class that can define a list of sort keys to sort on. The keys are sorted globally so that an order that doesn't have to do with the current widget hierarchy may be defined.
It also adds a shortcut sortKey argument to the Semantics widget that simply sets the sortOrder to just contain that key.
The platform side (flutter/engine#4540) gets an additional member in the SemanticsData object that is an integer describing where in the overall order each semantics node belongs. There is an associated engine-side change that takes this integer and uses it to order widgets for the platform's accessibility services.
For backward compatibility we keep supporting specifying the shape as a
combination of MaterialType and borderRadius, and we just use that as a
default when shapeBorder is null.
To cleanup the implementation if shapeBorder was not specified we just
translate the specified shape to a shapeBorder internally.
I benchmarked paint, layout and hit testing, with the specialized shape
clippers vs. the equivalent path clippers and did not see any
significant performance difference.
For testing, I extended the clippers/physicalShape matchers to match either the
specialized shape or the equivalent shape.
* Add a callback that fires when a Draggable leaves a DragTarget. This enables the DragTarget to manage its state from entry to exit.
* It helps to have a null check here
* Add test for onLeave callback and add verbiage to onWillAccept explaining the callback lifecycle of a DragTarget.
* controller, position and test
* Make controllers swappable
* WIP
* Create a ListWheelScrollPhysics
* Created picker and gallery demo and testing now
* Works. Ready to document and test.
* Document and add tests. Make the scroll controller more generic.
* minor cleanup
* review
* review
* fix tests
* stop using TransformLayers for now
* Set _imageInfo to null before adding listener to new ImageStream
Fixes an edge case where switching the ImageStream to an already completed ImageStream caused the Image widget to show nothing. ImageStreamCompleter calls the listener during addListener if their image is already loaded.
* Fix whitespace
* Add test to verify correct behavior
* Added test from mravn-google's PR