render method
Renders the elements of this component.
Accepted return types:
dart:html
UINode
andUIElement
.- DIVElement, DOMNode, AsDOMElement and AsDOMNode.
- Future.
- UIAsyncContent.
- String, parsed as
HTML
. - Map (rendered as JSON).
- List with previous types (recursively).
- Function that returns any previous type. Including Function
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;
}