render method

  1. @override
dynamic render()
override

Renders the elements of this component.

Accepted return types:

Implementation

@override
dynamic render() {
  _asyncContentRenderCount++;

  var properties = renderProperties();

  if ((!cacheRenderAsync && _asyncContentRenderCount > 1) ||
      !UIAsyncContent.isValid(_asyncContent, properties)) {
    _asyncContent = UIAsyncContent.provider(
        () => _renderAsync!(renderProperties()), loadingContent,
        errorContent: errorContent,
        refreshInterval: refreshInterval,
        properties: properties);
    _asyncContent!.onLoadContent.listen((content) {
      onLoadAsyncContent.add(content);
      onChange.add(content);
    });
    _asyncContentRenderCount = 0;
  }

  return _asyncContent;
}