updateZone method

Future<Zone> updateZone(
  1. String zoneName, {
  2. String? type,
  3. Map<String, dynamic>? geometry,
  4. double? maxSpeed,
  5. String? newName,
  6. Map<String, dynamic>? extra,
})

Change a zone's type, geometry, maxSpeed, and/or its name. Omitted values are left unchanged.

// Example:
final zone = await myNavigationService.updateZone('stairs', maxSpeed: 0.5);

For more information, see the navigation service docs.

Implementation

Future<Zone> updateZone(
  String zoneName, {
  String? type,
  Map<String, dynamic>? geometry,
  double? maxSpeed,
  String? newName,
  Map<String, dynamic>? extra,
}) async {
  final request = UpdateZoneRequest(
    name: name,
    zoneName: zoneName,
    type: type,
    geometry: geometry?.toStruct(),
    maxSpeed: maxSpeed,
    newName: newName,
    extra: extra?.toStruct(),
  );
  final response = await client.updateZone(request, options: callOptions);
  return response.zone;
}