render method

  1. @override
HTMLElement render()
override

Creates an HTML Element represention of Component.

Implementation

@override
HTMLElement render() {
  onStackChange.stream.listen((event) {
    if (event.$1 == 'add' && event.$2 == this) {
      onRender();
    }

    if (event.$1 == 'remove' && event.$2 == this) {
      onDispose();
    }
  });

  final templateWrapper = super.render() as HTMLElement;

  final context = Context(stack.indexOf(this), this);
  templateWrapper.appendChild(build(context).render());

  return templateWrapper;
}