Googleのページで設定
- Credentialsを選ぶ
- APIキーを選ぶ
map_viewを使う
これを使いたい https://pub.dartlang.org/packages/map_view
このページのREADME.md、Example、Installingのタブを見るのがいい。
flutter packages get
コマンドを行う。
dependencies: flutter: sdk: flutter # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.0 map_view: "^0.0.12"
iOS用の設定
ios/Runner/Info.plist
を開く
<dict>
あたりに以下のように追加。
<dict> <key>NSLocationWhenInUseUsageDescription</key> <string>Using location to display on a map</string>
Exampleのlib/main.dart
にExampleから貼ればいいと思う。