update method

void update({
  1. bool? snapToGrid,
  2. bool? snapAnnotationsToGrid,
  3. double? gridSize,
  4. double? portSnapDistance,
  5. double? minZoom,
  6. double? maxZoom,
  7. bool? showMinimap,
  8. bool? isMinimapInteractive,
})

Update multiple properties at once

Implementation

void update({
  bool? snapToGrid,
  bool? snapAnnotationsToGrid,
  double? gridSize,
  double? portSnapDistance,
  double? minZoom,
  double? maxZoom,
  bool? showMinimap,
  bool? isMinimapInteractive,
}) {
  runInAction(() {
    if (snapToGrid != null) this.snapToGrid.value = snapToGrid;
    if (snapAnnotationsToGrid != null) {
      this.snapAnnotationsToGrid.value = snapAnnotationsToGrid;
    }
    if (gridSize != null) this.gridSize.value = gridSize;
    if (portSnapDistance != null) {
      this.portSnapDistance.value = portSnapDistance;
    }
    if (minZoom != null) this.minZoom.value = minZoom;
    if (maxZoom != null) this.maxZoom.value = maxZoom;
    if (showMinimap != null) this.showMinimap.value = showMinimap;
    if (isMinimapInteractive != null) {
      this.isMinimapInteractive.value = isMinimapInteractive;
    }
  });
}