buildContent method

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

Implementation

@override
dynamic buildContent(Object? context,
    {bool asElement = true,
    bool resolveDSX = true,
    QueryElementProvider? elementProvider}) {
  var value = variable!.getResolved(context);

  if (value is Iterable) {
    var built = value
        .map((val) => super.buildContent(val,
            asElement: asElement,
            resolveDSX: resolveDSX,
            elementProvider: elementProvider))
        .expand((e) => e is List ? e : [e])
        .toList();
    return built;
  } else {
    return super.buildContent(value,
        asElement: asElement,
        resolveDSX: resolveDSX,
        elementProvider: elementProvider);
  }
}