setEnv function

void setEnv({
  1. Environment? env,
})

Implementation

void setEnv({Environment? env}) {
  switch (env) {
    case Environment.prod:
      _config = {
        _baseUrl: "https://api.sadadpay.net/api",
        _clientKey: clientKey,
        _clientSecret: clientSecret
      };
      break;
    case Environment.stage:
      _config = {
        _baseUrl: "https://apisandbox.sadadpay.net/api",
        _clientKey: clientKey,
        _clientSecret: clientSecret
      };
      break;
    default:
      _config = {
        _baseUrl: "https://apisandbox.sadadpay.net/api",
        _clientKey: clientKey,
        _clientSecret: clientSecret
      };
  }
}