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.
While using the
flutter_google_places_sdk
plugin, I noticed that thePlaceField
enum lists anId
option. However, thePlace
object doesn't seem to have a correspondingID
field.Code Snippets
The
PlaceField
enum includes anId
:The
Place
object definition doesn't have a field forID
:Suggested Solution
To make the API consistent, it would be beneficial to include an
ID
field in thePlace
class. This would align with the options available inPlaceField
enum.