title: Couldn't resolve the package 'geolocator' in 'package:geolocator/geolocator.dart'
body: <p>Install geolocator 8.0.0, everything is normal. But when I go to run the project I get all these errors, even though I import the library correctly.</p>
  <pre><code>class GoogleMapsPage extends StatefulWidget {
   const GoogleMapsPage({Key? key}) : super(key: key);
  
   @override
   State&lt;GoogleMapsPage&gt; createState() =&gt; _GoogleMapsPageState();
  }
  
  class _GoogleMapsPageState extends State&lt;GoogleMapsPage&gt; {
  late GoogleMapController mapController;
  
  final LatLng _center = const LatLng(-16.39882897344725, -71.53693778929792);
  late Position position;
  String long = &quot;&quot;, lat = &quot;&quot;;
  void _onMapCreated(GoogleMapController controller) {
    mapController = controller;
  }
  
  getLocation() async {
    position = await Geolocator.getCurrentPosition(
        desiredAccuracy: LocationAccuracy.high);
    print(position.longitude); 
    print(position.latitude); 
  
    long = position.longitude.toString();
    lat = position.latitude.toString();
  
    LocationSettings locationSettings = const LocationSettings(
      accuracy: LocationAccuracy.high, 
      distanceFilter: 100, 
    );
  }
  </code></pre>
  <p>The errors are</p>
  <p>Error: Couldn't resolve the package 'geolocator' in 'package:geolocator/geolocator.dart'.
  : Error: Not found: 'package:geolocator/geolocator.dart'core/…/lib/dependencies.dart:26
  export 'package:geolocator/geolocator.dart';</p>
  <p>Error: Type 'Position' not found.
  package:provide_geographical_map/…/pages/google_maps_page.dart:21
  late Position position;
  ^^^^^^^^
  : Error: 'Position' isn't a type.
  package:provide_geographical_map/…/pages/google_maps_page.dart:21
  late Position position;
  ^^^^^^^^
  : Error: 'LocationSettings' isn't a type.
  package:provide_geographical_map/…/pages/google_maps_page.dart:40
  LocationSettings locationSettings = const LocationSettings(
  ^^^^^^^^^^^^^^^^
  : Error: Undefined name 'LocationAccuracy'.
  package:provide_geographical_map/…/pages/google_maps_page.dart:41
  accuracy: LocationAccuracy.high,
  ^^^^^^^^^^^^^^^^
  : Error: Couldn't find constructor 'LocationSettings'.
  package:provide_geographical_map/…/pages/google_maps_page.dart:40</p>
  <pre><code>LocationSettings locationSettings = const LocationSettings(
  </code></pre>
  <p>Error: The getter 'Geolocator' isn't defined for the class '_GoogleMapsPageState'.
  package:provide_geographical_map/…/pages/google_maps_page.dart:28</p>
  <ul>
  <li>'_GoogleMapsPageState' is from 'package:provide_geographical_map/src/presentation/pages/google_maps_page.dart' ('features/provide_geographical_map/lib/src/presentation/pages/google_maps_page.dart').
  package:provide_geographical_map/…/pages/google_maps_page.dart:1
  Try correcting the name to the name of an existing getter, or defining a getter or field named 'Geolocator'.
  position = await Geolocator.getCurrentPosition(
  ^^^^^^^^^^
  : Error: The getter 'LocationAccuracy' isn't defined for the class '_GoogleMapsPageState'.
  package:provide_geographical_map/…/pages/google_maps_page.dart:29</li>
  <li>'_GoogleMapsPageState' is from 'package:provide_geographical_map/src/presentation/pages/google_maps_page.dart' ('features/provide_geographical_map/lib/src/presentation/pages/google_maps_page.dart').
  package:provide_geographical_map/…/pages/google_maps_page.dart:1
  Try correcting the name to the name of an existing getter, or defining a getter or field named 'LocationAccuracy'.
  desiredAccuracy: LocationAccuracy.high);
  ^^^^^^^^^^^^^^^^</li>
  </ul>