Skip to content

Commit

Permalink
Run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bahung1221 committed Feb 14, 2021
1 parent f52a142 commit bd58ec9
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 20 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v0.1.5 - 2021-02-13

- Update linter rules.


## v0.1.4 - 2021-02-13

### Added
Expand Down
7 changes: 7 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
include: package:pedantic/analysis_options.yaml

analyzer:
exclude: [lib/raw/proto/**, example/**]

linter:
rules:
omit_local_variable_types: false
unnecessary_this: false
1 change: 1 addition & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ void decodeForEachGeoJsonType() async {
print(geojson.properties);
print(geojson.geometry.type);
print(geojson.geometry.coordinates);
print('\n');
}

if (feature.geometryType == GeometryType.MultiPoint) {
Expand Down
2 changes: 1 addition & 1 deletion lib/util/geojson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class GeoJsonMultiPolygon extends GeoJson<GeometryMultiPolygon> {
}

class GeoJsonFeatureCollection extends GeoJson {
final GeoJsonType type = GeoJsonType.FeatureCollection;
@override final GeoJsonType type = GeoJsonType.FeatureCollection;
List<GeoJson> features;

GeoJsonFeatureCollection({
Expand Down
12 changes: 6 additions & 6 deletions lib/util/geometry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Geometry {
}

class GeometryPoint extends Geometry {
final type = GeometryType.Point;
@override final type = GeometryType.Point;
List<double> coordinates;

GeometryPoint({
Expand All @@ -27,7 +27,7 @@ class GeometryPoint extends Geometry {
}

class GeometryMultiPoint extends Geometry {
final type = GeometryType.MultiPoint;
@override final type = GeometryType.MultiPoint;
List<List<double>> coordinates;

GeometryMultiPoint({
Expand All @@ -36,7 +36,7 @@ class GeometryMultiPoint extends Geometry {
}

class GeometryLineString extends Geometry {
final type = GeometryType.LineString;
@override final type = GeometryType.LineString;
List<List<double>> coordinates;

GeometryLineString({
Expand All @@ -45,7 +45,7 @@ class GeometryLineString extends Geometry {
}

class GeometryMultiLineString extends Geometry {
final type = GeometryType.MultiLineString;
@override final type = GeometryType.MultiLineString;
List<List<List<double>>> coordinates;

GeometryMultiLineString({
Expand All @@ -54,7 +54,7 @@ class GeometryMultiLineString extends Geometry {
}

class GeometryPolygon extends Geometry {
final type = GeometryType.Polygon;
@override final type = GeometryType.Polygon;
List<List<List<double>>> coordinates;

GeometryPolygon({
Expand All @@ -63,7 +63,7 @@ class GeometryPolygon extends Geometry {
}

class GeometryMultiPolygon extends Geometry {
final type = GeometryType.MultiPolygon;
@override final type = GeometryType.MultiPolygon;
List<List<List<List<double>>>> coordinates;

GeometryMultiPolygon({
Expand Down
16 changes: 8 additions & 8 deletions lib/vector_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ class VectorTile {
return VectorTile(layers: layers);
}

static VectorTile fromGeoJson({
@required List<GeoJson> features,
@required String layerName,
@required String extent,
@required String version,
}) {
// TODO
}
// static VectorTile fromGeoJson({
// @required List<GeoJson> features,
// @required String layerName,
// @required String extent,
// @required String version,
// }) {
// // TODO
// }

Future<void> toPath({@required String path}) async {

Expand Down
6 changes: 3 additions & 3 deletions lib/vector_tile_feature.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ class VectorTileFeature {
this.values,
});

static VectorTileFeature fromGeoJson(GeoJson geoJson) {
// TODO
}
// static VectorTileFeature fromGeoJson(GeoJson geoJson) {
// // TODO
// }

raw.VectorTile_Feature toRaw() {
return raw.VectorTile_Feature(
Expand Down
6 changes: 4 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: vector_tile
version: 0.1.4
version: 0.1.5
description: >-
A simple Dart package to encode & decode Mapbox Vector Tile, A implementation of Mapbox Vector Tile specification.
homepage: https://github.com/saigontek/dart-vector-tile
Expand All @@ -9,4 +9,6 @@ environment:
dependencies:
meta: ^1.2.4
fixnum: ^0.10.11
protobuf: '>=1.1.0 <2.0.0'
protobuf: '>=1.1.0 <2.0.0'
dev_dependencies:
pedantic: ^1.9.2

0 comments on commit bd58ec9

Please sign in to comment.