RelativeRotaryRotation.fromJson constructor

RelativeRotaryRotation.fromJson(
  1. Map<String, dynamic> dataMap
)

Creates a RelativeRotaryRotation object from the JSON response to a GET request.

Implementation

factory RelativeRotaryRotation.fromJson(Map<String, dynamic> dataMap) {
  return RelativeRotaryRotation(
    direction: dataMap[ApiFields.direction] ?? "",
    steps: dataMap[ApiFields.steps] ?? 0,
    durationMilliseconds: dataMap[ApiFields.duration] ?? 0,
  );
}