copy method

OsmChange copy()

Implementation

OsmChange copy() {
  if (element == null) {
    return OsmChange.create(
      tags: Map.of(newTags.cast<String, String>()),
      location: newLocation!,
      error: error,
      updated: updated,
      databaseId: databaseId,
      newId: newId,
    );
  }

  return OsmChange(
    element!,
    newTags: Map.of(newTags),
    newLocation: newLocation,
    hardDeleted: _deleted,
    error: error,
    updated: updated,
    newNodes: newNodes,
    databaseId: databaseId,
  );
}