Skip to content

Commit

Permalink
Merge pull request #9 from MadBrains/dev
Browse files Browse the repository at this point in the history
2.1.0
  • Loading branch information
mit-73 authored Feb 17, 2023
2 parents 2083202 + 5aedb8d commit 3b13183
Show file tree
Hide file tree
Showing 19 changed files with 138 additions and 255 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [2.1.0]

* `Comparer` refactor
* Dependency update

## [2.0.2]

* Dependency Update
Expand Down
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2022 Mad Brains
Copyright (c) 2023 Mad Brains


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ FVM_DART = $(FVM) dart


init:
$(FVM) use 3.0.1 --force; $(FVM_DART) pub global activate pana;
$(FVM) use 3.7.3 --force; $(FVM_DART) pub global activate pana;


version:
$(FVM_FLUTTER) --version; $(FVM_DART) --version;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The geocoder helps to determine the coordinates of an object by its address or,
Add this to your package's pubspec.yaml file:
```yaml
dependencies:
yandex_geocoder: <lastles>
yandex_geocoder: 2.1.0
```
## Usage
Expand Down
2 changes: 1 addition & 1 deletion README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Для подключения добавьте в файл Pubspec зависимости:
```yaml
dependencies:
yandex_geocoder: <lastles>
yandex_geocoder: 2.1.0
```
## Использование
Expand Down
1 change: 0 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ linter:
- file_names
- hash_and_equals
- implementation_imports
- invariant_booleans
- iterable_contains_unrelated_type
- join_return_with_assignment
- leading_newlines_in_multiline_strings
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.19.2 <3.0.0"

dependencies:
flutter:
Expand Down
9 changes: 2 additions & 7 deletions lib/src/models/request/geocode.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ class PointGeocode extends Geocode {
}

@override
Map<String, Object> get equals => <String, Object>{
'Latitude': latitude,
'Longitude': longitude,
};
List<Object> get comparedObjects => <Object>[latitude, longitude];
}

/// {@template address_geocode}
Expand All @@ -62,7 +59,5 @@ class AddressGeocode extends Geocode {
}

@override
Map<String, Object> get equals => <String, Object>{
'Address': address,
};
List<Object> get comparedObjects => <Object>[address];
}
28 changes: 14 additions & 14 deletions lib/src/models/request/geocode_request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,20 +111,6 @@ class GeocodeRequest with Comparer {
/// {@macro lang}
final Lang? lang;

@override
Map<String, Object?> get equals => <String, Object?>{
kGeocode: geocode,
kApiKey: apiKey,
kKind: kind,
kRspn: rspn,
kLl: ll,
kSpn: spn,
kBbox: bbox,
kResults: results,
kSkip: skip,
kLang: lang,
};

/// Преобразование модели в json
Map<String, String> toJson() => <String, String>{
if (apiKey != null) kApiKey: apiKey!,
Expand All @@ -140,4 +126,18 @@ class GeocodeRequest with Comparer {
if (skip != null) kSkip: skip!.toString(),
if (lang != null) kLang: lang!._toLang(),
};

@override
List<Object?> get comparedObjects => <Object?>[
geocode,
apiKey,
kind,
rspn,
ll,
spn,
bbox,
results,
skip,
lang,
];
}
19 changes: 5 additions & 14 deletions lib/src/models/request/search_area.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ class SearchAreaLL extends SearchArea {
}

@override
Map<String, Object> get equals => <String, Object>{
'Latitude': latitude,
'Longitude': longitude,
};
List<Object> get comparedObjects => <Object>[latitude, longitude];
}

/// {@template search_area_spn}
Expand All @@ -64,10 +61,8 @@ class SearchAreaSPN extends SearchArea {
}

@override
Map<String, Object> get equals => <String, Object>{
'Difference Latitude': differenceLatitude,
'Difference Longitude': differenceLongitude,
};
List<Object> get comparedObjects =>
<Object>[differenceLatitude, differenceLongitude];
}

/// {@template search_area_bbox}
Expand Down Expand Up @@ -106,10 +101,6 @@ class SearchAreaBBOX extends SearchArea {
}

@override
Map<String, Object> get equals => <String, Object>{
'Latitude Left': latitudeLeft,
'Latitude Right': latitudeRight,
'Longitude Left': longitudeLeft,
'Longitude Right': longitudeRight,
};
List<Object> get comparedObjects =>
<Object>[latitudeLeft, latitudeRight, longitudeLeft, longitudeRight];
}
Loading

0 comments on commit 3b13183

Please sign in to comment.