Skip to content

Commit

Permalink
remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiedentop committed Feb 12, 2024
1 parent 4e5cbc2 commit e821e22
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
11 changes: 3 additions & 8 deletions lib/src/geojson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,7 @@ class Position extends CoordinateType {
]);

/// Position.of([<Lng>, <Lat>, <Alt (optional)>])
Position.of(List<num> 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<num> list) => Position.of(list);

Expand Down Expand Up @@ -324,9 +322,7 @@ class BBox extends CoordinateType {
]);

/// Position.of([<Lng>, <Lat>, <Alt (optional)>])
BBox.of(List<num> 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<num> list) => BBox.of(list);

Expand Down Expand Up @@ -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<String, dynamic> json) {
return json['type'] == 'GeometryCollection' ||
Expand Down
1 change: 0 additions & 1 deletion lib/src/line_to_polygon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
15 changes: 5 additions & 10 deletions lib/src/nearest_point_on_line.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<Point> toFeature() {
Expand Down

0 comments on commit e821e22

Please sign in to comment.