createScreenSPI method

  1. @override
TSPI createScreenSPI({
  1. required AFRouteParam? launchParam,
})
override

Implementation

@override
TSPI createScreenSPI({ required AFRouteParam? launchParam }) {
  // find the existing SPI.
  final spi = AFibF.g.testOnlyScreenSPIMap[screenId];
  if(spi == null) {
    throw AFException("No spi found for screen $screenId, maybe you have a test that is not navigating to that screen, but does reference its SPI?");
  }
  if(spi is! TSPI) {
    throw AFException("Found spi for $screenId but it has type ${spi.runtimeType} instead of $TSPI");
  }
  return spi;
}