getDescription method
Get environment description
Implementation
String getDescription(SDKEnvironment environment) {
try {
final lib = PlatformLoader.loadCommons();
final getDescFn = lib.lookupFunction<Pointer<Utf8> Function(Int32),
Pointer<Utf8> Function(int)>('rac_env_description');
final result = getDescFn(_environmentToInt(environment));
if (result == nullptr) return 'Unknown Environment';
return result.toDartString();
} catch (e) {
switch (environment) {
case SDKEnvironment.development:
return 'Development Environment';
case SDKEnvironment.staging:
return 'Staging Environment';
case SDKEnvironment.production:
return 'Production Environment';
}
}
}