updateZone method
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;
}