parsePlaceAutocompletePrediction function

List<PlaceAutocompletePrediction>? parsePlaceAutocompletePrediction(
  1. List? data
)

Implementation

List<PlaceAutocompletePrediction>? parsePlaceAutocompletePrediction(
    List? data) {
  if (data == null) return null;

  final items = <PlaceAutocompletePrediction>[];
  for (final d in data) {
    final item = PlaceAutocompletePrediction.fromMap(d);
    items.add(item);
  }
  return items;
}