startupPrototypeId property

AFID get startupPrototypeId

Implementation

AFID get startupPrototypeId {
  final env = environment;
  AFID? proto;
  String? call;
  if(env == AFEnvironment.startupInWireframe) {
    proto = startupWireframe;
    call = "Wireframe";
  } else if(env == AFEnvironment.startupInScreenPrototype) {
    proto = startupScreenPrototype;
    call = "ScreenPrototype";
  } else if(env == AFEnvironment.startupInStateTest) {
    // we need to go through all the
    proto = startupStateTestId;
  } else {
    throw AFException("Invalid environment $env for calling startPrototypeId");
  }

  if(proto == null) {
    throw AFException("You set the environment to $env, but you also need to call AFConfig.setStartup$call to specify which prototype to start");
  }
  return proto;
}