sortChildren method Null safety

void sortChildren(
  1. int compare(
    1. DisplayObject a,
    2. DisplayObject b
    )
)

Sorts the child list according to the order specified by the compare Function.

Implementation

void sortChildren(int Function(DisplayObject a, DisplayObject b) compare) {
  _children.sort(compare);
}