From 180e8b35bb8b7de72b833b2325b366f99f65a18e Mon Sep 17 00:00:00 2001 From: Petrus Nguyen Thai Hoc Date: Fri, 21 Jun 2024 17:05:07 +0700 Subject: [PATCH] fix --- lib/src/google_maps_webservice/src/places.g.dart | 4 ++-- pubspec.yaml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/google_maps_webservice/src/places.g.dart b/lib/src/google_maps_webservice/src/places.g.dart index 8cec477..266eabe 100644 --- a/lib/src/google_maps_webservice/src/places.g.dart +++ b/lib/src/google_maps_webservice/src/places.g.dart @@ -186,7 +186,7 @@ Map _$OpeningHoursDetailToJson(OpeningHoursDetail instance) => OpeningHoursPeriodDate _$OpeningHoursPeriodDateFromJson( Map json) => OpeningHoursPeriodDate( - day: json['day'] as int, + day: (json['day'] as num).toInt(), time: json['time'] as String, ); @@ -313,7 +313,7 @@ Prediction _$PredictionFromJson(Map json) => Prediction( ?.map((e) => Term.fromJson(e as Map)) .toList() ?? [], - distanceMeters: json['distance_meters'] as int?, + distanceMeters: (json['distance_meters'] as num?)?.toInt(), placeId: json['place_id'] as String?, reference: json['reference'] as String?, types: diff --git a/pubspec.yaml b/pubspec.yaml index 005e0ac..2516f06 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -41,3 +41,5 @@ flutter: assets: - packages/flutter_google_places_hoc081098/assets/google_black.png - packages/flutter_google_places_hoc081098/assets/google_white.png + +# dart run build_runner build --delete-conflicting-outputs \ No newline at end of file