dartclub / geotypes

MIT License
1 stars 1 forks source link

copyWith(options) method for Feature class. #6

Open armantorkzaban opened 1 year ago

armantorkzaban commented 1 year ago

Next to .clone() we could benefit from this:

var f1 = Feature(id: ''sth, properties: {'sth':'sth'},geometry: 
Point(coordination: Position.of([1,1])));
var f2 = f1.copyWith({'position':Position.of([2,2])});
assert(f2.properties ==f1.properties);

@lukas-h

lukas-h commented 1 year ago

It would make sense for Features.

Go ahead with this!