inflate method

  1. @override
List<Widget> inflate()
override

this routine creates views for all of its children

Implementation

@override
List<Widget> inflate() {
  // sort children by depth
  if (children != null) {
    children!.sort((a, b) {
      if (a is ViewableWidgetMixin && b is ViewableWidgetMixin) {
        if (a.depth != null && b.depth != null) {
          return a.depth?.compareTo(b.depth!) ?? 0;
        }
      }
      return 0;
    });
  }
  return super.inflate();
}