Skip to content

Commit

Permalink
🚨 Add pedantic + fix relative lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Perraut committed Aug 3, 2020
1 parent 023bf3d commit 14fff13
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 42 deletions.
5 changes: 5 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include: package:pedantic/analysis_options.yaml

linter:
rules:
omit_local_variable_types: false
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class _MyHomePageState extends State<MyHomePage> {
title: Text(widget.title),
),
body: FlutterMap(
options: new MapOptions(
options: MapOptions(
plugins: [
TappablePolylineMapPlugin(),
],
Expand All @@ -82,7 +82,7 @@ class _MyHomePageState extends State<MyHomePage> {
polylineCulling: true,
polylines: [
TaggedPolyline(
tag: "My Polyline",
tag: 'My Polyline',
// An optional tag to distinguish polylines in callback
points: getPoints(),
color: Colors.red,
Expand Down
55 changes: 17 additions & 38 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.13"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.0"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -50,6 +36,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
collection:
dependency: transitive
description:
Expand Down Expand Up @@ -85,6 +78,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
file:
dependency: transitive
description:
Expand Down Expand Up @@ -124,7 +124,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.3.2"
version: "0.4.0"
flutter_test:
dependency: "direct dev"
description: flutter
Expand All @@ -144,13 +144,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.4"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.12"
intl:
dependency: transitive
description:
Expand Down Expand Up @@ -206,7 +199,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.4"
version: "1.7.0"
path_provider:
dependency: transitive
description:
Expand Down Expand Up @@ -242,13 +235,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.0"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
platform:
dependency: transitive
description:
Expand Down Expand Up @@ -358,7 +344,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.15"
version: "0.2.16"
transparent_image:
dependency: transitive
description:
Expand Down Expand Up @@ -422,13 +408,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.6.1"
sdks:
dart: ">=2.7.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
1 change: 1 addition & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dev_dependencies:
flutter_map_tappable_polyline:
path: ../


# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

Expand Down
3 changes: 3 additions & 0 deletions lib/flutter_map_tappable_polyline.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ import 'package:flutter_map/flutter_map.dart';
import 'package:flutter_map/plugin_api.dart';

class TappablePolylineMapPlugin extends MapPlugin {
@override
bool supportsLayer(LayerOptions options) =>
options is TappablePolylineLayerOptions;

@override
Widget createLayer(
LayerOptions options, MapState mapState, Stream<Null> stream) {
return TappablePolylineLayer(options, mapState, stream);
}
}

class TappablePolylineLayerOptions extends PolylineLayerOptions {
@override
final List<TaggedPolyline> polylines;
final double pointerDistanceTolerance;
Function onTap = (TaggedPolyline polyline) {};
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ packages:
source: hosted
version: "1.0.2"
pedantic:
dependency: transitive
dependency: "direct dev"
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0+1"
version: "1.9.0"
platform:
dependency: transitive
description:
Expand Down
3 changes: 3 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ dependencies:
flutter:
sdk: flutter
flutter_map: ^0.10.1

dev_dependencies:
pedantic: ^1.9.0

0 comments on commit 14fff13

Please sign in to comment.