build method

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

Implementation

@override
dynamic build(Object? context,
    {bool asElement = true,
    bool resolveDSX = true,
    QueryElementProvider? elementProvider,
    IntlMessageResolver? intlMessageResolver}) {
  if (nodes.isEmpty) return null;

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

  return built;
}