matanshukry / flutter_google_places_sdk

Flutter plugin for google places native sdk
32 stars 68 forks source link

Missing ID Field on Place Object Despite Being Listed in PlaceField Enum #61

Closed AristideVB closed 9 months ago

AristideVB commented 9 months ago

While using the flutter_google_places_sdk plugin, I noticed that the PlaceField enum lists an Id option. However, the Place object doesn't seem to have a corresponding ID field.

Code Snippets

The PlaceField enum includes an Id:

enum PlaceField {
  Address,
  AddressComponents,
  BusinessStatus,
  Id,
  @JsonValue('LAT_LNG') Location,
  // ... rest of the fields
}

The Place object definition doesn't have a field for ID:

@freezed
class Place with _$Place {
  const factory Place({
    required String? address,
    required List<AddressComponent>? addressComponents,
    // ... rest of the fields
  }) = _Place;
}

Suggested Solution

To make the API consistent, it would be beneficial to include an ID field in the Place class. This would align with the options available in PlaceField enum.

kyadalu1 commented 9 months ago

https://www.youtube.com/watch?v=3M5fKhc1PJw

matanshukry commented 9 months ago

@AristideVB Implemented and published under sdk version 0.3.7

AristideVB commented 9 months ago

Thank you @matanshukry 🙏