RedisProvider.fromEnvironment constructor
RedisProvider.fromEnvironment(
- EnvContract env
Implementation
factory RedisProvider.fromEnvironment(EnvContract env) {
env.validate(RedisEnvKeys.values);
return RedisProvider(
host: env.get(RedisEnvKeys.redisHost),
port: int.parse(env.get(RedisEnvKeys.redisPort)),
password: env.get<String?>(RedisEnvKeys.redisPassword),
);
}