SdkConfig.fromEnvironment constructor
SdkConfig.fromEnvironment(
- String env
Implementation
factory SdkConfig.fromEnvironment(String env) {
switch (env) {
case 'production':
return SdkConfig(
baseUrl: 'https://gkx.gokwik.co/',
snowplowUrl: 'https://sp-kf-collector-prod.gokwik.io',
schemaVendor: 'co.gokwik',
checkoutUrl: {
'shopify':
'https://pdp.gokwik.co/app/kwik-checkout.html?storeInfo=',
'custom': 'https://pdp.gokwik.co/v4/auto.html',
},
notifEventsUrl: 'https://api-gw.tlphnt.co/webhook/push-notification',
);
case 'sandbox':
return SdkConfig(
baseUrl: 'https://api-gw-v4.dev.gokwik.io/sandbox/',
snowplowUrl: 'https://sp-kf-collector.dev.gokwik.io/',
schemaVendor: 'in.gokwik.kwikpass',
checkoutUrl: {
'shopify':
'https://sandbox.pdp.gokwik.co/app/kwik-checkout.html?storeInfo=',
'custom': 'https://sandbox.pdp.gokwik.co/v4/auto.html',
},
notifEventsUrl:
'https://api-gw.kwikchatdev.qoowk.com/webhook/push-notification',
);
case 'qa':
return SdkConfig(
baseUrl: 'https://api-gw-v4.dev.gokwik.io/qa/',
snowplowUrl: 'https://sp-kf-collector.dev.gokwik.io/',
schemaVendor: 'in.gokwik.kwikpass',
checkoutUrl: {
'shopify':
'https://sandbox.pdp.gokwik.co/app/kwik-checkout.html?storeInfo=',
'custom': 'https://sandbox.pdp.gokwik.co/v4/auto.html',
},
notifEventsUrl:
'https://api-gw.kwikchatdev.qoowk.com/webhook/push-notification',
);
case 'dev':
return SdkConfig(
baseUrl: 'https://api-gw-v4.dev.gokwik.io/dev/',
snowplowUrl: 'https://sp-kf-collector.dev.gokwik.io/',
schemaVendor: 'in.gokwik.kwikpass',
checkoutUrl: {
'shopify':
'https://sandbox.pdp.gokwik.co/app/kwik-checkout.html?storeInfo=',
'custom': 'https://sandbox.pdp.gokwik.co/v4/auto.html',
},
notifEventsUrl:
'https://api-gw.kwikchatdev.qoowk.com/webhook/push-notification',
);
default:
throw ArgumentError('Unknown environment: $env');
}
}