diff --git a/lib/src/geojson.dart b/lib/src/geojson.dart index 619fe12..4a7fea4 100644 --- a/lib/src/geojson.dart +++ b/lib/src/geojson.dart @@ -210,9 +210,7 @@ class Position extends CoordinateType { ]); /// Position.of([, , ]) - Position.of(List list) - : assert(list.length >= 2 && list.length <= 3), - super(list); + Position.of(super.list) : assert(list.length >= 2 && list.length <= 3); factory Position.fromJson(List list) => Position.of(list); @@ -324,9 +322,7 @@ class BBox extends CoordinateType { ]); /// Position.of([, , ]) - BBox.of(List list) - : assert(list.length == 4 || list.length == 6), - super(list); + BBox.of(super.list) : assert(list.length == 4 || list.length == 6); factory BBox.fromJson(List list) => BBox.of(list); @@ -392,8 +388,7 @@ class BBox extends CoordinateType { } abstract class GeometryObject extends GeoJSONObject { - GeometryObject.withType(GeoJSONObjectType type, {BBox? bbox}) - : super.withType(type, bbox: bbox); + GeometryObject.withType(super.type, {super.bbox}) : super.withType(); static GeometryObject deserialize(Map json) { return json['type'] == 'GeometryCollection' || diff --git a/lib/src/line_to_polygon.dart b/lib/src/line_to_polygon.dart index bf537da..59e0152 100644 --- a/lib/src/line_to_polygon.dart +++ b/lib/src/line_to_polygon.dart @@ -60,7 +60,6 @@ Feature lineToPolygon( ...list, ...currentGeometry.coordinates .map((e) => e.map((p) => p.clone()).toList()) - .toList() ]; } else { throw Exception("$currentGeometry type is not supperted"); diff --git a/lib/src/nearest_point_on_line.dart b/lib/src/nearest_point_on_line.dart index 4656bef..1e037be 100644 --- a/lib/src/nearest_point_on_line.dart +++ b/lib/src/nearest_point_on_line.dart @@ -37,18 +37,13 @@ class _NearestMulti extends _Nearest { final int localIndex; _NearestMulti({ - required Point point, - required num distance, - required int index, + required super.point, + required super.distance, + required super.index, required this.localIndex, - required num location, + required super.location, required this.line, - }) : super( - point: point, - distance: distance, - index: index, - location: location, - ); + }); @override Feature toFeature() {