remove method
Remove adapterId.
Deprecated v3 adapter: a null (or omitted) adapterId forwards to
removeAll.
Throws SDKException when the removal fails.
Implementation
Future<void> remove([String? adapterId]) async {
if (adapterId == null) {
return removeAll();
}
if (!DartBridge.isInitialized) {
throw SDKException.notInitialized();
}
final state = await RunAnywhereLoRACapability.shared.remove(
LoraRemoveRequest(adapterIds: [adapterId]),
);
if (state.hasError()) {
throw SDKException.invalidState(state.error.message);
}
}