Skip to content

Commit

Permalink
Minor Bug fixes, Package upgrades(PR #73), and version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Ketan Choyal committed Sep 22, 2023
1 parent db93b8d commit 0781250
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 98 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# [4.1.0-beta.3] - 22 Sep 2023
- Package Upgrades
- Minor bug fixes

# [4.1.0-beta.2] - 18 May 2023
- Added color dependency to the package so that I don't have to manage code related to it.

Expand Down
32 changes: 20 additions & 12 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.1"
version: "1.18.0"
color:
dependency: transitive
description:
Expand All @@ -29,18 +29,18 @@ packages:
dependency: transitive
description:
name: crypto
sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
url: "https://pub.dev"
source: hosted
version: "3.0.2"
version: "3.0.3"
http:
dependency: transitive
description:
name: http
sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2"
sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525"
url: "https://pub.dev"
source: hosted
version: "0.13.6"
version: "1.1.0"
http_parser:
dependency: transitive
description:
Expand All @@ -60,10 +60,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
path:
dependency: transitive
description:
Expand All @@ -80,6 +80,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.10.0"
sprintf:
dependency: transitive
description:
name: sprintf
sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
url: "https://pub.dev"
source: hosted
version: "7.0.0"
string_scanner:
dependency: transitive
description:
Expand All @@ -100,17 +108,17 @@ packages:
dependency: transitive
description:
name: typed_data
sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5"
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
url: "https://pub.dev"
source: hosted
version: "1.3.1"
version: "1.3.2"
uuid:
dependency: transitive
description:
name: uuid
sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313"
sha256: e03928880bdbcbf496fb415573f5ab7b1ea99b9b04f669c01104d085893c3134
url: "https://pub.dev"
source: hosted
version: "3.0.7"
version: "4.0.0"
sdks:
dart: ">=3.0.0 <4.0.0"
7 changes: 4 additions & 3 deletions lib/models/location_context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Context {
this.street,
});

final Country country;
final Country? country;
final Region? region;
final Place? postcode;
final Place? district;
Expand All @@ -20,7 +20,8 @@ class Context {
final Neighborhood? street;

factory Context.fromJson(Map<String, dynamic> json) => Context(
country: Country.fromJson(json["country"]),
country:
json["country"] == null ? null : Country.fromJson(json["country"]),
region: json["region"] == null ? null : Region.fromJson(json["region"]),
postcode:
json["postcode"] == null ? null : Place.fromJson(json["postcode"]),
Expand All @@ -36,7 +37,7 @@ class Context {
);

Map<String, dynamic> toJson() => {
"country": country.toJson(),
"country": country?.toJson(),
"region": region?.toJson(),
"postcode": postcode?.toJson(),
"district": district?.toJson(),
Expand Down
9 changes: 5 additions & 4 deletions lib/models/suggestion_response.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ class Suggestion {
final String? address;
final String? fullAddress;
final String placeFormatted;
final Context context;
final Context? context;
final String language;
final String maki;
final String? maki;
final ExternalIds externalIds;
final List<String>? poiCategory;
final List<String>? poiCategoryIds;
Expand All @@ -75,7 +75,8 @@ class Suggestion {
address: json["address"],
fullAddress: json["full_address"],
placeFormatted: json["place_formatted"],
context: Context.fromJson(json["context"]),
context:
json["context"] == null ? null : Context.fromJson(json["context"]),
language: json["language"],
maki: json["maki"],
externalIds: ExternalIds.fromJson(json["external_ids"]),
Expand All @@ -99,7 +100,7 @@ class Suggestion {
"address": address,
"full_address": fullAddress,
"place_formatted": placeFormatted,
"context": context.toJson(),
"context": context?.toJson(),
"language": language,
"maki": maki,
"external_ids": externalIds.toJson(),
Expand Down
Loading

0 comments on commit 0781250

Please sign in to comment.