getAppContext function

AppContext getAppContext (
  1. AppContextType type,
  2. {bool allowDynamicLink: true}
)

Implementation

AppContext getAppContext(AppContextType type, {bool allowDynamicLink = true}) {
  switch (type) {
    case AppContextType.PROD:
      return ProdAppContext(allowDynamicLink: allowDynamicLink);
    case AppContextType.MOCK:
      return MockAppContext(allowDynamicLink: allowDynamicLink);
    case AppContextType.EMULATOR:
      return EmulatorAppContext(allowDynamicLink: allowDynamicLink);
    default:
      return ProdAppContext(allowDynamicLink: allowDynamicLink);
  }
}