initRuntime method

  1. @override
Future<Stream<DataPackage>> initRuntime(
  1. Map<String, List<DataPackage>> modules,
  2. StreamController<DataPackage> outputController
)
override

Implementation

@override
Future<Stream<DataPackage>> initRuntime(
    Map<String, List<DataPackage>> modules,
    StreamController<DataPackage> outputController) {
  // Build the map to route channels correctly from the mock env.
  for (var ch in env.channels) {
    _routerChannelMap[ch.id] = DataPackage(
        channel: ch.id,
        sourceModule: ch.sourceModule,
        targetModule: ch.targetModule);
  }

  return Future<Stream<DataPackage>>.delayed(
      Duration.zero, () => _mockRouterInputStream(outputController.stream));
}