I want to run the example of google_maps_flutter. So I downloaded the code from https://github.com/flutter/plugins and open the /plugins/tree/master/packages/google_maps_flutter/google_maps_flutter using android studio.
In the README.md file, it said
Usage
To use this plugin, add
google_maps_flutter
as a dependency in your pubspec.yaml file.
After I added the
dependencies:
google_maps_flutter: ^1.0.3
it shows
Error on line 11, column 3 of pubspec.yaml: A package may not list itself as a dependency. ╷ 11 │ google_maps_flutter: ^1.0.3 │
^^^^^^^^^^^^^^^^^^^ ╵ pub get failed (65; ╵)
After I changed line 1 from name: google_maps_flutter
to name: google_maps_flutter_eg
, it shows
Error on line 1, column 7 of ../pubspec.yaml: "name" field doesn't match expected name "google_maps_flutter". ╷ 1 │ name: google_maps_flutter_eg │ ^^^^^^^^^^^^^^^^^^^^^^ ╵ pub get failed (65; ╵)
how can i change the name of this project for me to run the example?
below is the pubspec.yaml
name: google_maps_flutter
description: A Flutter plugin for integrating Google Maps in iOS and Android applications.
homepage: https://github.com/flutter/plugins/tree/master/packages/google_maps_flutter/google_maps_flutter
version: 1.0.7
dependencies:
flutter:
sdk: flutter
flutter_plugin_android_lifecycle: ^1.0.0
google_maps_flutter_platform_interface: ^1.0.4
google_maps_flutter: ^1.0.6
dev_dependencies:
flutter_test:
sdk: flutter
# TODO(iskakaushik): The following dependencies can be removed once
# https://github.com/dart-lang/pub/issues/2101 is resolved.
flutter_driver:
sdk: flutter
test: ^1.6.0
pedantic: ^1.8.0
plugin_platform_interface: ^1.0.2
mockito: ^4.1.1
flutter:
plugin:
platforms:
android:
package: io.flutter.plugins.googlemaps
pluginClass: GoogleMapsPlugin
ios:
pluginClass: FLTGoogleMapsPlugin
environment:
sdk: ">=2.1.0 <3.0.0"
flutter: ">=1.22.0 <2.0.0"