From e821e220311ce288b5d7934a3b18dff0041ade7a Mon Sep 17 00:00:00 2001 From: Jonas Siedentop Date: Mon, 12 Feb 2024 23:31:21 +0100 Subject: [PATCH] remove warnings --- lib/src/geojson.dart | 11 +++-------- lib/src/line_to_polygon.dart | 1 - lib/src/nearest_point_on_line.dart | 15 +++++---------- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/lib/src/geojson.dart b/lib/src/geojson.dart index 619fe127..4a7fea47 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 bf537dad..59e01527 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 4656bef1..1e037be1 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() {