listConnectors method
List connectors associated with the current account.
Returns a list of SealdConnector instances.
Implementation
List<SealdConnector> listConnectors() {
if (_closed) {
throw SealdException(
code: "INSTANCE_CLOSED",
id: "FLUTTER_INSTANCE_CLOSED",
description: "Instance already closed.");
}
final Pointer<Pointer<NativeSealdConnectorsArray>> result =
calloc<Pointer<NativeSealdConnectorsArray>>();
final Pointer<Pointer<NativeSealdError>> err =
calloc<Pointer<NativeSealdError>>();
final int resultCode =
_bindings.SealdSdk_ListConnectors(_ptr.pointer(), result, err);
if (resultCode != 0) {
calloc.free(result);
throw SealdException._fromCPtr(err);
} else {
final List<SealdConnector> connectors =
SealdConnector._fromCArray(result.value);
calloc.free(result);
calloc.free(err);
return connectors;
}
}