Skip to content

Commit b41d9ce

Browse files
RSDK-9636: Add deprecation warning with date the Discover Components will be deprecated to the flutter SDK (#331)
* add deprecation warnings to flutter sdk * also deprecate DiscoveryQuery * fix warning log
1 parent 010db72 commit b41d9ce

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/src/robot/client.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ class RobotClientOptions {
5858

5959
/// {@category Viam SDK}
6060
/// Represents a discovery query in the SDK to query for discoverable components.
61+
///
62+
/// deprecated, remove on march 10th
6163
class DiscoveryQuery {
6264
final String subtype;
6365
final String model;
@@ -334,6 +336,8 @@ class RobotClient {
334336
return await _client.getCloudMetadata(rpb.GetCloudMetadataRequest());
335337
}
336338

339+
/// Deprecated: use the Discovery Service APIs instead.
340+
///
337341
/// Discover components that the robot can connect to, given specific query metadata.
338342
///
339343
/// ```
@@ -347,6 +351,7 @@ class RobotClient {
347351
..model = sdkQuery.model
348352
..extra = sdkQuery.extraStruct));
349353

354+
_logger.w("RobotClient.discoverComponents is deprecated. It will be removed on March 10 2025. Use the DiscoveryService APIs instead.");
350355
final response = await _client.discoverComponents(request);
351356
return response.discovery.map((d) => Discovery.fromProto(d)).toList();
352357
}

0 commit comments

Comments
 (0)