init method
void
init()
Registers the ext.hmr.dispatch VM service extension so the parent can
forward events. Safe to call multiple times. No-op when isActive is
false, so production code can call it unconditionally.
Implementation
void init() {
if (_extensionRegistered || !isActive) return;
_extensionRegistered = true;
developer.registerExtension('ext.hmr.dispatch', _handleDispatch);
}