title: Flutter Google Maps not determining current location of device
body: <p>I'm using Flutter's Geolocator and Google Maps packages to determine a device's location. I utilize the Circular Progress Bar to wait for the current location to be determined. Once determined, Google Maps loads with the device's location identified. </p>
  
  <p>When the application loads, the circular progress bar is displayed but the map is not loaded despite the notification being displayed and accepted to use location services; the app hangs on the circular progress bar. I don't believe this to be an API issue as I have had success loading the map with coordinates specified in InitialCameraPosition.</p>
  
  <p>Is the device's location not being determined which is the cause for the map to not load with the location indicated?</p>
  
  <p>I've tried running the app on both Android emulator and a physical device without success.</p>
  
  <pre><code>Android Manifest:
  
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="smartkart.app.com.coffee"&gt;
  
  &lt;!-- io.flutter.app.FlutterApplication is an android.app.Application 
   that
       calls FlutterMain.startInitialization(this); in its onCreate 
    method.
       In most cases you can leave this as-is, but you if you want to   
        provide
       additional functionality it is fine to subclass or reimplement
       FlutterApplication and put your custom class here. --&gt;
  
   &lt;uses-permission  
   android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
  
  
  
  &lt;application
      android:name="io.flutter.app.FlutterApplication"
      android:label="coffee"
      android:icon="@mipmap/ic_launcher"&gt;
      &lt;meta-data android:name="com.google.android.geo.API_KEY"
                 android:value="API KEY HERE"/&gt;
      &lt;activity../&gt;
  
  
  
  Maps Screen
  
  import 'package:flutter/material.dart';
  import 'package:flutter/widgets.dart';
  import 'package:google_maps_flutter/google_maps_flutter.dart';
  import 'package:geolocator/geolocator.dart';
  
  class FirstScreen extends StatefulWidget {
   const FirstScreen({Key key}) : super(key: key);
  
    @override
    State&lt;FirstScreen&gt; createState() =&gt; _FirstScreen();
  }
  
  class _FirstScreen extends State&lt;FirstScreen&gt; {
    GoogleMapController mapController;
  
   var currentLocation;
  
  
  @override
  void initState(){
    super.initState();
    Geolocator().getCurrentPosition().then((currloc){
      currentLocation = currloc;
    });
  }
  
  
    @override
    Widget build(BuildContext context) {
      return currentLocation == null ? Container(
        alignment: Alignment.center,
        child: Center(
          child: CircularProgressIndicator(),
        ),
      ):
        Stack(
        children: &lt;Widget&gt;[
          GoogleMap(
            initialCameraPosition:
             CameraPosition(target: LatLng(currentLocation.latitude,      
                currentLocation.longitude), zoom: 10),
            onMapCreated: _onMapCreated,
            myLocationEnabled: true,
            mapType: MapType.normal,
          ),
        ],
      );
    }
  
  
  
    void _onMapCreated(GoogleMapController controller) {
      setState(() {
        mapController = controller;
      });
    }
  
  
  }
  </code></pre>
  
  <p>I expect the notification to use location services to appear while the circular progress bar is displayed. Once the location is determined, the InitialCameraPosition displays the device's location on the map.</p>