createLocation function

Location createLocation(
  1. dynamic args
)

Implementation

Location createLocation(dynamic args) {
  return Location(
    coordinate: Coordinate(
      latitude: args["coordinate"]["latitude"],
      longitude: args["coordinate"]["longitude"],
    ),
    cartesianCoordinate: CartesianCoordinate(
      x: args["cartesianCoordinate"]["x"] ?? 0,
      y: args["cartesianCoordinate"]["y"] ?? 0,
    ),
    bearing: Angle(
      degrees: args["bearing"]["degrees"],
      degreesClockwise: args["bearing"]["degreesClockwise"],
      radians: args["bearing"]["radians"],
      radiansMinusPiPi: args["bearing"]["radiansMinusPiPi"],
    ),
    accuracy: args["accuracy"],
    buildingIdentifier: args["buildingIdentifier"],
    floorIdentifier: args["floorIdentifier"],
    hasBearing: args["hasBearing"],
    isIndoor: args["isIndoor"],
    isOutdoor: args["isOutdoor"],
    timestamp: args["timestamp"].toInt(),
  );
}