• Greg Spencer's avatar
    Adds the semantic node traversal API. (#14060) · 14309b93
    Greg Spencer authored
    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.
    14309b93
binding.dart 12.4 KB