render method

  1. @override
HTMLElement render()
override

Creates an HTML Element represention of Component.

Implementation

@override
HTMLElement render() {
  final element = super.render() as HTMLElement;

  if (loading != null) {
    element.append(loading!.render());
  }

  promise.then((value) {
    clear();
    element.append(onResolve(value).render());
  }).catchError((error) {
    if (onReject != null) {
      clear();
      element.append(onReject!(error).render());
    }
  });

  return element;
}