OsrmGeometry constructor

OsrmGeometry({
  1. OsrmLineString? lineString,
  2. OsrmPolyline? polyline,
  3. OsrmPolyline6? polyline6,
})

Implementation

OsrmGeometry({
  this.lineString,
  this.polyline,
  this.polyline6,
}) : // only one of them can be not null
      assert((() {
        var result = (lineString != null ? 1 : 0) +
            (polyline != null ? 1 : 0) +
            (polyline6 != null ? 1 : 0);
        return result <= 1;
      })(), 'only one of them can be not null');