getSdkError static method
Implementation
static Error getSdkError(
String key, {
String context = '',
}) {
if (SDK_ERRORS.containsKey(key)) {
return new Error(
SDK_ERRORS[key]!['code']! as int,
context != ''
? "${SDK_ERRORS[key]!['message']! as String} $context"
: SDK_ERRORS[key]!['message']! as String,
);
}
return new Error(-1, "UNKNOWN SDK ERROR");
}