Google Maps Place Picker Package issue in Flutter

I am implementing google_maps_picker in my flutter application and I am facing a weird issue where the FloatCard result is only shown after I press the getMyLocation button, otherwise it just shows the CircularProgressIndicator.

 import 'package:flutter/material.dart';
    // import 'package:google_maps/google_maps.dart';
    import 'package:google_maps/google_maps.dart';
    import 'package:google_maps_place_picker/google_maps_place_picker.dart'
        as place;
    // import 'package:location/location.dart';
    import '../components/location_helper.dart';
    // import '../components/location_helper.dart';
    class MapScreen extends StatelessWidget {
      final LatLng location1 = LatLng(37.657, -122.776);
      Widget build(BuildContext context) {
        return Scaffold(
            appBar: AppBar(
              title: Text('Map Screen'),
            body: Center(
              child: place.PlacePicker(
                  apiKey: GOOGLE_API,
                  useCurrentLocation: true,
                  onPlacePicked: (result) {

enter image description here

Read more here:

Content Attribution

This content was originally published by mustafa zaki at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: