initialize method

void initialize(
  1. Element element,
  2. bool replace
)

Starts the activity and watcher Widget.

Implementation

void initialize(Element element, bool replace) {
  _watcher.initActivity(() {
    _watcher.node = _html.call(this).node;
    _watcher.node.styles = _styles?.call();
    _watcher.node.init(element, replace);
    onMount();
  });

  _watcher.watchActivity(() {
    activity();
    _update();
    _controlState();
  });
}