buildContent method

dynamic buildContent(
  1. Object? context, {
  2. bool asElement = true,
  3. bool resolveDSX = true,
  4. QueryElementProvider? elementProvider,
})

Implementation

dynamic buildContent(Object? context,
    {bool asElement = true,
    bool resolveDSX = true,
    QueryElementProvider? elementProvider}) {
  if (nodes.isEmpty) return null;

  var built = nodes
      .map((n) {
        var built = n.build(context,
            asElement: asElement,
            resolveDSX: resolveDSX,
            elementProvider: elementProvider);
        return built;
      })
      .where((e) => e != null)
      .expand((e) => e is List ? e : [e])
      .toList();

  return built;
}