inflate method

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

this routine creates views for all of its children

Implementation

@override
List<Widget> inflate()
{
  // process children
  List<Widget> views = [];
  for (var model in viewableChildren)
  {
    if (model is! ModalModel)
    {
      var view = model.getView();

      // wrap child in child data widget
      // this is done for us in "positioned" if the child happens
      // to be a positioned widget and the layout is "stack" (see positioned_view.dart)
      if (view is! PositionedView)
      {
        view = LayoutBoxChildData(child: view!, model: model);
      }

      if (view != null) views.add(view);
    }
  }

  // add the static child
  if (child != null)
  {
    var view = child;
    if (view is! PositionedView)
    {
       view = LayoutBoxChildData(child: child!, model: this);
    }
    views.add(view!);
  }

  return views;
}