Skip to content

Commit fecf2c4

Browse files
authored
Migrate to flutter_lints (#788)
1 parent d762ba1 commit fecf2c4

24 files changed

+113
-108
lines changed

.github/workflows/app_facing_package.yaml renamed to .github/workflows/geolocator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This is a basic workflow to help you get started with Actions
22

3-
name: app_facing_package
3+
name: geolocator
44

55
# Controls when the action will run. Triggers the workflow on push or pull request
66
# events but only for the develop branch

.github/workflows/platform_interface_package.yaml renamed to .github/workflows/geolocator_platform_interface.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This is a basic workflow to help you get started with Actions
22

3-
name: platform_interface_package
3+
name: geolocator_platform_interface
44

55
# Controls when the action will run. Triggers the workflow on push or pull request
66
# events but only for the develop branch

.github/workflows/web_implementation_package.yaml renamed to .github/workflows/geolocator_web.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This is a basic workflow to help you get started with Actions
2-
name: web_implementation_package
2+
name: geolocator_web
33

44
# Controls when the action will run. Triggers the workflow on push or pull request
55
# events but only for the develop branch

geolocator/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Flutter Geolocator Plugin
22

3-
[![pub package](https://img.shields.io/pub/v/geolocator.svg)](https://pub.dartlang.org/packages/geolocator) ![Build status](https://github.com/Baseflow/flutter-geolocator/workflows/app_facing_package/badge.svg?branch=master) [![style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://github.com/tenhobi/effective_dart) [![codecov](https://codecov.io/gh/Baseflow/flutter-geolocator/branch/master/graph/badge.svg)](https://codecov.io/gh/Baseflow/flutter-geolocator)
3+
[![pub package](https://img.shields.io/pub/v/geolocator.svg)](https://pub.dartlang.org/packages/geolocator) ![Build status](https://github.com/Baseflow/flutter-geolocator/workflows/geolocator/badge.svg?branch=master) [![style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://github.com/tenhobi/effective_dart) [![codecov](https://codecov.io/gh/Baseflow/flutter-geolocator/branch/master/graph/badge.svg)](https://codecov.io/gh/Baseflow/flutter-geolocator)
44

55
A Flutter geolocation plugin which provides easy access to platform specific location services ([FusedLocationProviderClient](https://developers.google.com/android/reference/com/google/android/gms/location/FusedLocationProviderClient) or if not available the [LocationManager](https://developer.android.com/reference/android/location/LocationManager) on Android and [CLLocationManager](https://developer.apple.com/documentation/corelocation/cllocationmanager) on iOS).
66

geolocator_platform_interface/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.3.3
2+
3+
- Migrated to [flutter_lints](https://pub.dev/packages/flutter_lints) as linter rule set as it replaces the deprecated [effective_dart](https://pub.dev/packages/effective_dart) package.
4+
15
## 2.3.2
26

37
- Added the possibility to pass your own purposeKey name to the requestTemporaryFullAccuracy method.

geolocator_platform_interface/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# geolocator_platform_interface
22

3-
[![pub package](https://img.shields.io/pub/v/geolocator_platform_interface.svg)](https://pub.dartlang.org/packages/geolocator_platform_interface) ![Build status](https://github.com/Baseflow/flutter-geolocator/workflows/platform_interface_package/badge.svg?branch=master) [![style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://github.com/tenhobi/effective_dart)
3+
[![pub package](https://img.shields.io/pub/v/geolocator_platform_interface.svg)](https://pub.dartlang.org/packages/geolocator_platform_interface) ![Build status](https://github.com/Baseflow/flutter-geolocator/workflows/geolocator_platform_interface/badge.svg?branch=master) [![style: flutter_lints](https://img.shields.io/badge/style-flutter_lints-40c4ff.svg)](https://pub.dev/packages/flutter_lints)
44

55
A common platform interface for the [`geolocator`][1] plugin.
66

geolocator_platform_interface/analysis_options.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
include: package:effective_dart/analysis_options.yaml
1+
include: package:flutter_lints/flutter.yaml
2+
23
analyzer:
34
exclude:
45
# Ignore generated files

geolocator_platform_interface/lib/src/geolocator_platform_interface.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ abstract class GeolocatorPlatform extends PlatformInterface {
2121
/// Constructs a GeolocatorPlatform.
2222
GeolocatorPlatform() : super(token: _token);
2323

24-
static final Object _token = const Object();
24+
static const Object _token = Object();
2525

2626
static GeolocatorPlatform _instance = MethodChannelGeolocator();
2727

geolocator_platform_interface/lib/src/implementations/method_channel_geolocator.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ class MethodChannelGeolocator extends GeolocatorPlatform {
246246
case 'ACTIVITY_MISSING':
247247
throw ActivityMissingException(exception.message);
248248
case 'LOCATION_SERVICES_DISABLED':
249-
throw LocationServiceDisabledException();
249+
throw const LocationServiceDisabledException();
250250
case 'LOCATION_SUBSCRIPTION_ACTIVE':
251-
throw AlreadySubscribedException();
251+
throw const AlreadySubscribedException();
252252
case 'PERMISSION_DEFINITIONS_NOT_FOUND':
253253
throw PermissionDefinitionsNotFoundException(exception.message);
254254
case 'PERMISSION_DENIED':

geolocator_platform_interface/lib/src/models/position.dart

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Position {
66
/// Constructs an instance with the given values for testing. [Position]
77
/// instances constructed this way won't actually reflect any real information
88
/// from the platform, just whatever was passed in at construction time.
9-
Position({
9+
const Position({
1010
required this.longitude,
1111
required this.latitude,
1212
required this.timestamp,
@@ -75,18 +75,18 @@ class Position {
7575
final bool isMocked;
7676

7777
@override
78-
bool operator ==(Object o) {
79-
var areEqual = o is Position &&
80-
o.accuracy == accuracy &&
81-
o.altitude == altitude &&
82-
o.heading == heading &&
83-
o.latitude == latitude &&
84-
o.longitude == longitude &&
85-
o.floor == o.floor &&
86-
o.speed == speed &&
87-
o.speedAccuracy == speedAccuracy &&
88-
o.timestamp == timestamp &&
89-
o.isMocked == isMocked;
78+
bool operator ==(Object other) {
79+
var areEqual = other is Position &&
80+
other.accuracy == accuracy &&
81+
other.altitude == altitude &&
82+
other.heading == heading &&
83+
other.latitude == latitude &&
84+
other.longitude == longitude &&
85+
other.floor == floor &&
86+
other.speed == speed &&
87+
other.speedAccuracy == speedAccuracy &&
88+
other.timestamp == timestamp &&
89+
other.isMocked == isMocked;
9090

9191
return areEqual;
9292
}

0 commit comments

Comments
 (0)