register<T extends FastModuleProtocol> method

void register<T extends FastModuleProtocol>(
  1. T moudle
)

注册组件

Implementation

void register<T extends FastModuleProtocol>(T moudle) {
  _modules[moudle.runtimeType.toString()] = moudle;
  fastPrintInfo('${moudle.runtimeType.toString()} 注册组件');
  if (moudle.widgetsBindingObserver) {
    fastPrintInfo('${moudle.runtimeType.toString()} 监听应用生命周期');
    ambiguate(WidgetsBinding.instance)?.addObserver(moudle);
  }
}