isUsableCredential static method
Whether a baked-in credential is usable: non-empty and not a scaffolding
placeholder. Delegates to the canonical commons rule
(rac_dev_config_is_usable_credential) so every SDK agrees instead of
each re-implementing the rule.
Implementation
static bool isUsableCredential(String? value) {
if (value == null) return false;
final lib = PlatformLoader.loadCommons();
final fn = lib
.lookupFunction<
Bool Function(Pointer<Utf8>),
bool Function(Pointer<Utf8>)
>('rac_dev_config_is_usable_credential');
final ptr = value.toNativeUtf8();
try {
return fn(ptr);
} finally {
calloc.free(ptr);
}
}