Skip to content

Commit

Permalink
DOCS-3351: Update Flutter SDK links (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
JessamyT authored Jan 15, 2025
1 parent 2d08a2d commit 98ea2d6
Show file tree
Hide file tree
Showing 12 changed files with 190 additions and 103 deletions.
26 changes: 17 additions & 9 deletions lib/src/components/arm/arm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import '../../robot/client.dart';
/// {@category Components}
/// Arm represents a physical robot arm that exists in three-dimensional space.
///
/// For more information, see [Arm component](https://docs.viam.com/components/arm/).
/// For more information, see [Arm component](https://docs.viam.com/dev/reference/apis/components/arm/).
abstract class Arm extends Resource {
static const Subtype subtype = Subtype(resourceNamespaceRDK, resourceTypeComponent, 'arm');

Expand All @@ -15,7 +15,7 @@ abstract class Arm extends Resource {
/// final currentPose = await myArm.endPosition();
/// ```
///
/// For more information, see [Arm component](https://docs.viam.com/components/arm/).
/// For more information, see [Arm component](https://docs.viam.com/dev/reference/apis/components/arm/#getendposition).
Future<Pose> endPosition({Map<String, dynamic>? extra});

/// Move the end of the arm to the [Pose] specified.
Expand All @@ -28,7 +28,7 @@ abstract class Arm extends Resource {
/// await myArm.moveToPosition(targetPose);
/// ```
///
/// For more information, see [Arm component](https://docs.viam.com/components/arm/).
/// For more information, see [Arm component](https://docs.viam.com/dev/reference/apis/components/arm/#movetoposition).
Future<void> moveToPosition(Pose pose, {Map<String, dynamic>? extra});

/// Move each joint on the arm to the corresponding position specified in [positions].
Expand All @@ -41,7 +41,7 @@ abstract class Arm extends Resource {
/// await myArm.moveToJointPositions(targetPositions);
/// ```
///
/// For more information, see [Arm component](https://docs.viam.com/components/arm/).
/// For more information, see [Arm component](https://docs.viam.com/dev/reference/apis/components/arm/#movetojointpositions).
Future<void> moveToJointPositions(List<double> positions, {Map<String, dynamic>? extra});

/// Get the [List] of current joint angles of each arm joint
Expand All @@ -50,7 +50,7 @@ abstract class Arm extends Resource {
/// List<double> currentJointPositions = await myArm.moveToJointPosition();
/// ```
///
/// For more information, see [Arm component](https://docs.viam.com/components/arm/).
/// For more information, see [Arm component](https://docs.viam.com/dev/reference/apis/components/arm/#getjointpositions).
Future<List<double>> jointPositions({Map<String, dynamic>? extra});

/// Stop all motion of the arm. It is assumed that the arm stops immediately.
Expand All @@ -59,7 +59,7 @@ abstract class Arm extends Resource {
/// await myArm.stop();
/// ```
///
/// For more information, see [Arm component](https://docs.viam.com/components/arm/).
/// For more information, see [Arm component](https://docs.viam.com/dev/reference/apis/components/arm/#stop).
Future<void> stop({Map<String, dynamic>? extra});

/// Whether the arm is currently moving
Expand All @@ -68,19 +68,27 @@ abstract class Arm extends Resource {
/// bool isArmMoving = await myArm.isMoving();
/// ```
///
/// For more information, see [Arm component](https://docs.viam.com/components/arm/).
/// For more information, see [Arm component](https://docs.viam.com/dev/reference/apis/components/arm/#ismoving).
Future<bool> isMoving();

/// Get the [ResourceName] for this [Arm] with the given [name].
///
/// For more information, see [Arm component](https://docs.viam.com/components/arm/).
/// ```
/// final myArmResourceName = myArm.getResourceName("my_arm");
/// ```
///
/// For more information, see [Arm component](https://docs.viam.com/dev/reference/apis/components/arm/#getresourcename).
static ResourceName getResourceName(String name) {
return Arm.subtype.getResourceName(name);
}

/// Get the [Arm] named [name] from the provided robot.
///
/// For more information, see [Arm component](https://docs.viam.com/components/arm/).
/// ```
/// final myArm = Arm.fromRobot(myRobotClient, "my_arm");
/// ```
///
/// For more information, see [Arm component](https://docs.viam.com/dev/reference/apis/components/arm/).
static Arm fromRobot(RobotClient robot, String name) {
return robot.getResource(Arm.getResourceName(name));
}
Expand Down
28 changes: 18 additions & 10 deletions lib/src/components/base/base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ typedef BaseProperties = GetPropertiesResponse;
/// {@category Components}
/// Base represents a physical base of a robot.
///
/// For more information, see [Base component](https://docs.viam.com/components/base/).
/// For more information, see [Base component](https://docs.viam.com/dev/reference/apis/components/base/).
abstract class Base extends Resource {
static const Subtype subtype = Subtype(resourceNamespaceRDK, resourceTypeComponent, 'base');

Expand All @@ -24,7 +24,7 @@ abstract class Base extends Resource {
/// await myBase.moveStraight(40, 90);
/// ```
///
/// For more information, see [Base component](https://docs.viam.com/components/base/).
/// For more information, see [Base component](https://docs.viam.com/dev/reference/apis/components/base/#movestraight).
Future<void> moveStraight(int distance, double velocity, {Map<String, dynamic>? extra});

/// Spin the [Base] in place [angle] degrees, at the given angular [velocity], expressed in degrees per second.
Expand All @@ -37,7 +37,7 @@ abstract class Base extends Resource {
/// await myBase.spin(10, 15);
/// ```
///
/// For more information, see [Base component](https://docs.viam.com/components/base/).
/// For more information, see [Base component](https://docs.viam.com/dev/reference/apis/components/base/#spin).
Future<void> spin(double angle, double velocity, {Map<String, dynamic>? extra});

/// Set the linear and angular velocity of the [Base].
Expand All @@ -63,7 +63,7 @@ abstract class Base extends Resource {
/// await myBase.setPower(Vector3(), Vector3(0, 0, -0.6));
/// ```
///
/// For more information, see [Base component](https://docs.viam.com/components/base/).
/// For more information, see [Base component](https://docs.viam.com/dev/reference/apis/components/base/#setpower).
Future<void> setPower(Vector3 linear, Vector3 angular, {Map<String, dynamic>? extra});

/// Set the linear and angular velocities of the base, expressed as
Expand All @@ -76,7 +76,7 @@ abstract class Base extends Resource {
/// await myBase.setVelocity(Vector3(0, 50, 0), Vector3(0, 0, 15));
/// ```
///
/// For more information, see [Base component](https://docs.viam.com/components/base/).
/// For more information, see [Base component](https://docs.viam.com/dev/reference/apis/components/base/#setvelocity).
Future<void> setVelocity(Vector3 linear, Vector3 angular, {Map<String, dynamic>? extra});

/// Stop the base.
Expand All @@ -85,7 +85,7 @@ abstract class Base extends Resource {
/// await myBase.stop();
/// ```
///
/// For more information, see [Base component](https://docs.viam.com/components/base/).
/// For more information, see [Base component](https://docs.viam.com/dev/reference/apis/components/base/#stop).
Future<void> stop({Map<String, dynamic>? extra});

/// Whether the base is currently moving
Expand All @@ -94,25 +94,33 @@ abstract class Base extends Resource {
/// bool baseIsMoving = await myBase.isMoving();
/// ```
///
/// For more information, see [Base component](https://docs.viam.com/components/base/).
/// For more information, see [Base component](https://docs.viam.com/dev/reference/apis/components/base/#ismoving).
Future<bool> isMoving();

/// Get the [ResourceName] for this [Base] with the given [name]
///
/// For more information, see [Base component](https://docs.viam.com/components/base/).
/// For more information, see [Base component](https://docs.viam.com/dev/reference/apis/components/base/#getresourcename).
static ResourceName getResourceName(String name) {
return Base.subtype.getResourceName(name);
}

/// Report a dictionary mapping optional properties to
/// whether it is supported by this base.
///
/// For more information, see [Base component](https://docs.viam.com/components/base/).
/// ```
/// final myBaseResourceName = myBase.getResourceName("my_base");
/// ```
///
/// For more information, see [Base component](https://docs.viam.com/dev/reference/apis/components/base/#getproperties).
Future<BaseProperties> properties({Map<String, dynamic>? extra});

/// Get the [Base] named [name] from the provided robot.
///
/// For more information, see [Base component](https://docs.viam.com/components/base/).
/// ```
/// final myBase = Base.fromRobot(myRobotClient, "my_base");
/// ```
///
/// For more information, see [Base component](https://docs.viam.com/dev/reference/apis/components/base/).
static Base fromRobot(RobotClient robot, String name) {
return robot.getResource(Base.getResourceName(name));
}
Expand Down
38 changes: 23 additions & 15 deletions lib/src/components/board/board.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ typedef AnalogValue = ReadAnalogReaderResponse;
/// Board represents a physical general purpose compute board that contains various
/// components such as analog readers, and digital interrupts.
///
/// For more information, see [Board component](https://docs.viam.com/components/board/).
/// For more information, see [Board component](https://docs.viam.com/dev/reference/apis/components/board/).
abstract class Board extends Resource {
static const Subtype subtype = Subtype(resourceNamespaceRDK, resourceTypeComponent, 'board');

Expand All @@ -27,7 +27,7 @@ abstract class Board extends Resource {
/// await myBoard.setGpioState('15', true);
/// ```
///
/// For more information, see [Board component](https://docs.viam.com/components/board/).
/// For more information, see [Board component](https://docs.viam.com/dev/reference/apis/components/board/#setgpio).
Future<void> setGpioState(String pin, bool high, {Map<String, dynamic>? extra});

/// Get the high/low state of the given pin of a board.
Expand All @@ -37,7 +37,7 @@ abstract class Board extends Resource {
/// bool pinStateIsHigh = await myBoard.gpio('15');
/// ```
///
/// For more information, see [Board component](https://docs.viam.com/components/board/).
/// For more information, see [Board component](https://docs.viam.com/dev/reference/apis/components/board/#getgpio).
Future<bool> gpio(String pin, {Map<String, dynamic>? extra});

/// Get the duty cycle of the given pin of a board.
Expand All @@ -47,7 +47,7 @@ abstract class Board extends Resource {
/// var dutyCycle = await myBoard.pwm('15');
/// ```
///
/// For more information, see [Board component](https://docs.viam.com/components/board/).
/// For more information, see [Board component](https://docs.viam.com/dev/reference/apis/components/board/#pwm).
Future<double> pwm(String pin, {Map<String, dynamic>? extra});

/// Set the duty cycle of the given pin of a board.
Expand All @@ -57,7 +57,7 @@ abstract class Board extends Resource {
/// await myBoard.setPwm('13', 0.6);
/// ```
///
/// For more information, see [Board component](https://docs.viam.com/components/board/).
/// For more information, see [Board component](https://docs.viam.com/dev/reference/apis/components/board/#setpwm).
Future<void> setPwm(String pin, double dutyCyclePct, {Map<String, dynamic>? extra});

/// Get the PWM frequency of the given pin of a board.
Expand All @@ -67,7 +67,7 @@ abstract class Board extends Resource {
/// var frequency = await myBoard.pwmFrequency('11');
/// ```
///
/// For more information, see [Board component](https://docs.viam.com/components/board/).
/// For more information, see [Board component](https://docs.viam.com/dev/reference/apis/components/board/#pwmfrequency).
Future<int> pwmFrequency(String pin, {Map<String, dynamic>? extra});

/// Set the PWM frequency in hertz of the given pin of a board.
Expand All @@ -77,7 +77,7 @@ abstract class Board extends Resource {
/// await myBoard.setPwmFrequency('15', 1600);
/// ```
///
/// For more information, see [Board component](https://docs.viam.com/components/board/).
/// For more information, see [Board component](https://docs.viam.com/dev/reference/apis/components/board/#setpwmfrequency).
Future<void> setPwmFrequency(String pin, int frequencyHz, {Map<String, dynamic>? extra});

/// Read the current value of an analog reader of a board.
Expand All @@ -87,7 +87,7 @@ abstract class Board extends Resource {
/// var analogVal = await myBoard.analogReaderValue('my_example_analog');
/// ```
///
/// For more information, see [Board component](https://docs.viam.com/components/board/).
/// For more information, see [Board component](https://docs.viam.com/dev/reference/apis/components/board/#readanalogreader).
Future<AnalogValue> analogReaderValue(String analogReaderName, {Map<String, dynamic>? extra});

/// Return the current value of the interrupt which is based on the type of Interrupt.
Expand All @@ -97,7 +97,7 @@ abstract class Board extends Resource {
/// var interruptVal = await myBoard.digitalInterruptValue('my_example_digital_interrupt');
/// ```
///
/// For more information, see [Board component](https://docs.viam.com/components/board/).
/// For more information, see [Board component](https://docs.viam.com/dev/reference/apis/components/board/#getdigitalinterruptvalue).
Future<int> digitalInterruptValue(String digitalInterruptName, {Map<String, dynamic>? extra});

/// Stream digital interrupts ticks.
Expand All @@ -108,7 +108,7 @@ abstract class Board extends Resource {
/// Stream<Tick> tickStream = await myBoard.streamTicks(interrupts);
/// ```
///
/// For more information, see [Board component](https://docs.viam.com/components/board/).
/// For more information, see [Board component](https://docs.viam.com/dev/reference/apis/components/board/#streamticks).
Stream<Tick> streamTicks(List<String> interrupts, {Map<String, dynamic>? extra});

/// Add a listener for the digital interrupts.
Expand All @@ -120,7 +120,7 @@ abstract class Board extends Resource {
/// await myBoard.addCallbacks(interrupts, tickQueue);
/// ```
///
/// For more information, see [Board component](https://docs.viam.com/components/board/).
/// For more information, see [Board component](https://docs.viam.com/dev/reference/apis/components/board/).
Future<void> addCallbacks(List<String> interrupts, Queue<Tick> tickQueue, {Map<String, dynamic>? extra});

/// Set the board to the indicated power mode.
Expand All @@ -132,7 +132,7 @@ abstract class Board extends Resource {
/// await myBoard.setPowerMode(powerMode, 60, 0);
/// ```
///
/// For more information, see [Board component](https://docs.viam.com/components/board/).
/// For more information, see [Board component](https://docs.viam.com/dev/reference/apis/components/board/#setpowermode).
Future<void> setPowerMode(PowerMode powerMode, int seconds, int nanos, {Map<String, dynamic>? extra});

/// Write analog value to pin.
Expand All @@ -142,19 +142,27 @@ abstract class Board extends Resource {
/// await myBoard.writeAnalog('11', 48);
/// ```
///
/// For more information, see [Board component](https://docs.viam.com/components/board/).
/// For more information, see [Board component](https://docs.viam.com/dev/reference/apis/components/board/#writeanalog).
Future<void> writeAnalog(String pin, int value, {Map<String, dynamic>? extra});

/// Get the [ResourceName] for this [Board] with the given [name]
///
/// For more information, see [Board component](https://docs.viam.com/components/board/).
/// ```
/// final myBoardResourceName = myBoard.getResourceName("my_board");
/// ```
///
/// For more information, see [Board component](https://docs.viam.com/dev/reference/apis/components/board/#getresourcename).
static common.ResourceName getResourceName(String name) {
return Board.subtype.getResourceName(name);
}

/// Get the [Board] named [name] from the provided robot.
///
/// For more information, see [Board component](https://docs.viam.com/components/board/).
/// ```
/// final myBoard = Board.fromRobot(myRobotClient, "my_board");
/// ```
///
/// For more information, see [Board component](https://docs.viam.com/dev/reference/apis/components/board/).
static Board fromRobot(RobotClient robot, String name) {
return robot.getResource(Board.getResourceName(name));
}
Expand Down
20 changes: 14 additions & 6 deletions lib/src/components/camera/camera.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ typedef CameraProperties = GetPropertiesResponse;
/// {@category Components}
/// Camera represents any physical hardware that can capture frames.
///
/// For more information, see [Camera component](https://docs.viam.com/components/camera/).
/// For more information, see [Camera component](https://docs.viam.com/dev/reference/apis/components/camera/).
abstract class Camera extends Resource {
static const Subtype subtype = Subtype(resourceNamespaceRDK, resourceTypeComponent, 'camera');

Expand All @@ -21,7 +21,7 @@ abstract class Camera extends Resource {
/// var nextImage = await myCamera.image();
/// ```
///
/// For more information, see [Camera component](https://docs.viam.com/components/camera/).
/// For more information, see [Camera component](https://docs.viam.com/dev/reference/apis/components/camera/#getimage).
Future<ViamImage> image({MimeType? mimeType, Map<String, dynamic>? extra});

/// Get the next point cloud from the camera.
Expand All @@ -30,7 +30,7 @@ abstract class Camera extends Resource {
/// var nextPointCloud = await myCamera.pointCloud();
/// ```
///
/// For more information, see [Camera component](https://docs.viam.com/components/camera/).
/// For more information, see [Camera component](https://docs.viam.com/dev/reference/apis/components/camera/#getpointcloud).
Future<ViamImage> pointCloud({Map<String, dynamic>? extra});

/// Get the camera's intrinsic parameters and the camera's distortion parameters.
Expand All @@ -39,19 +39,27 @@ abstract class Camera extends Resource {
/// var cameraProperties = await myCamera.properties();
/// ```
///
/// For more information, see [Camera component](https://docs.viam.com/components/camera/).
/// For more information, see [Camera component](https://docs.viam.com/dev/reference/apis/components/camera/#getproperties).
Future<CameraProperties> properties();

/// Get the [ResourceName] for this [Camera] with the given [name]
///
/// For more information, see [Camera component](https://docs.viam.com/components/camera/).
/// ```
/// final myCameraResourceName = myCamera.getResourceName("my_camera");
/// ```
///
/// For more information, see [Camera component](https://docs.viam.com/dev/reference/apis/components/camera/#getresourcename).
static ResourceName getResourceName(String name) {
return Camera.subtype.getResourceName(name);
}

/// Get the [Camera] named [name] from the provided robot.
///
/// For more information, see [Camera component](https://docs.viam.com/components/camera/).
/// ```
/// final myCamera = Camera.fromRobot(myRobotClient, "my_camera");
/// ```
///
/// For more information, see [Camera component](https://docs.viam.com/dev/reference/apis/components/camera/).
static Camera fromRobot(RobotClient robot, String name) {
return robot.getResource(Camera.getResourceName(name));
}
Expand Down
Loading

0 comments on commit 98ea2d6

Please sign in to comment.