toEnvironment method
Implementation
SmartCheckoutEnvironment toEnvironment() {
switch (toLowerCase()) {
case 'production':
return SmartCheckoutEnvironment.production;
case 'sandbox':
return SmartCheckoutEnvironment.sandbox;
case 'development':
return SmartCheckoutEnvironment.development;
default:
throw ArgumentError('Unknown environment: $this');
}
}