├── .github ├── ISSUE_TEMPLATE │ └── bug_report.yml ├── dependabot.yml └── workflows │ ├── analyze.yaml │ ├── licence-check.yaml │ ├── scripts │ └── validate-formatting.sh │ └── test-and-build.yaml ├── .gitignore ├── .metadata ├── AUTHORS ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── flutter_maps_samples │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets └── icon_flutter.png ├── header_template.txt ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h └── RunnerTests │ └── RunnerTests.swift ├── lib ├── main.dart └── samples │ ├── basic.dart │ ├── camera_animate.dart │ ├── camera_move.dart │ ├── handle_events.dart │ ├── map_controller_async.dart │ ├── map_id.dart │ ├── map_type.dart │ ├── marker.dart │ ├── marker_clusters.dart │ ├── marker_clusters_dynamic.dart │ ├── marker_custom.dart │ ├── marker_dynamic.dart │ ├── my_location.dart │ ├── polygons.dart │ ├── polylines.dart │ ├── scrolling.dart │ └── styled_map.dart ├── melos.yaml ├── pubspec.lock ├── pubspec.yaml ├── screenshots.png ├── test └── smoke_test.dart └── web ├── favicon.png ├── icons ├── Icon-192.png ├── Icon-512.png ├── Icon-maskable-192.png └── Icon-maskable-512.png ├── index.html └── manifest.json /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: Bug report 2 | description: > 3 | Report an issue, including all necessary details for reproduction and 4 | debugging. 5 | title: '[Bug]: ' 6 | labels: ['type: bug', 'triage me'] 7 | body: 8 | - type: markdown 9 | attributes: 10 | value: | 11 | Thank you for using googlemaps-samples/flutter-maps-samples! 12 | 13 | If you believe this bug is related to a feature in our native SDKs or you have question about how features should be used, please create an issue in the [support console](https://console.cloud.google.com/google/maps-apis/support/createcase). This will ensure a timely response. 14 | 15 | Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform [support resources page](https://developers.google.com/maps/support/). 16 | 17 | If your bug is not related to this particular sample repo, please visit the [`google_maps_flutter` package](https://pub.dev/packages/google_maps_flutter) and its [issue tracker](https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22), or the Google Maps Platform [issue trackers](https://developers.google.com/maps/support/#issue_tracker). 18 | - type: checkboxes 19 | attributes: 20 | label: Is there an existing issue for this? 21 | description: Please ensure your bug is not already reported in [existing issues](https://github.com/googlemaps-samples/flutter-maps-samples/issues). 22 | options: 23 | - label: I have searched the existing issues 24 | required: true 25 | - type: textarea 26 | attributes: 27 | label: Description of the bug 28 | description: Provide a clear and concise description of the bug. 29 | validations: 30 | required: true 31 | - type: input 32 | attributes: 33 | label: Flutter version 34 | description: Provide the Flutter version used in your project. 35 | validations: 36 | required: true 37 | - type: checkboxes 38 | attributes: 39 | label: Native SDK versions 40 | description: Confirm that you have not changed the version of the native SDKs. 41 | options: 42 | - label: I haven't changed the version of the native SDKs 43 | required: true 44 | - type: textarea 45 | attributes: 46 | label: Flutter Doctor Output 47 | description: | 48 | Run `flutter doctor` in your project and paste the output below. 49 | validations: 50 | required: true 51 | - type: textarea 52 | attributes: 53 | label: Steps to reproduce 54 | description: | 55 | Provide a step-by-step description of how to reproduce the issue. 56 | Use bullet points or numbers for clarity. 57 | If you are not able to reproduce the issue, please provide as much context as possible. 58 | placeholder: | 59 | 1. In this environment... 60 | 2. With this config... 61 | 3. Run '...' 62 | 4. See error... 63 | validations: 64 | required: true 65 | - type: textarea 66 | attributes: 67 | label: Expected vs Actual Behavior 68 | description: | 69 | Describe what you expected to happen and what actually happened. 70 | 71 | Also provide any error messages or logs that you see. Also check Android logcat and/or iOS console logs for any relevant information. 72 | validations: 73 | required: true 74 | - type: textarea 75 | attributes: 76 | label: Code Sample 77 | description: | 78 | Provide a minimal reproducible example that shows the problem. Use a code block for formatting. 79 | 80 | Without this we will unlikely be able to progress on the issue, as we need to be able to reproduce the problem locally. 81 | value: | 82 | ```dart 83 | // Example code here 84 | ``` 85 | validations: 86 | required: true 87 | - type: textarea 88 | attributes: 89 | label: Additional Context 90 | description: | 91 | Provide any other context, logs, or screenshots that might be relevant. 92 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # https://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | version: 2 16 | updates: 17 | - package-ecosystem: "pub" 18 | directory: "/" # Location of package manifests 19 | schedule: 20 | interval: "weekly" 21 | open-pull-requests-limit: 10 22 | commit-message: 23 | prefix: chore(deps) 24 | - package-ecosystem: "github-actions" 25 | directory: "/" # Location of package manifests 26 | schedule: 27 | interval: "weekly" 28 | open-pull-requests-limit: 10 29 | commit-message: 30 | prefix: chore(deps) 31 | -------------------------------------------------------------------------------- /.github/workflows/analyze.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # https://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | name: Run code analysis 16 | on: 17 | pull_request: 18 | push: 19 | branches: 20 | - main 21 | 22 | concurrency: 23 | group: ${{ github.workflow }}-${{ github.ref }} 24 | cancel-in-progress: true 25 | 26 | jobs: 27 | flutter-analyze: 28 | timeout-minutes: 45 29 | runs-on: ubuntu-latest 30 | steps: 31 | - name: Checkout code 32 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 33 | - name: Setup flutter 34 | uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046 35 | with: 36 | flutter-version: "3.29.x" 37 | channel: "stable" 38 | cache: true 39 | - name: Setup melos 40 | uses: bluefireteam/melos-action@ec2c512a52c2f359186ca19bac0be977c44913e6 41 | with: 42 | melos-version: "6.0.0" 43 | - name: "Run Flutter Analyze" 44 | run: melos run flutter-analyze 45 | 46 | format: 47 | runs-on: ubuntu-latest 48 | timeout-minutes: 20 49 | steps: 50 | - name: Checkout code 51 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 52 | - name: Setup java 53 | uses: actions/setup-java@v4 54 | with: 55 | distribution: "temurin" 56 | java-version: "17" 57 | - name: Setup flutter 58 | uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046 59 | with: 60 | flutter-version: "3.29.x" 61 | channel: "stable" 62 | cache: true 63 | - name: Setup melos 64 | uses: bluefireteam/melos-action@ec2c512a52c2f359186ca19bac0be977c44913e6 65 | with: 66 | melos-version: "6.0.0" 67 | - name: Run format 68 | if: ${{ success() || failure() }} 69 | run: | 70 | melos run format 71 | - name: Validate formatting 72 | if: ${{ success() || failure() }} 73 | run: | 74 | ./.github/workflows/scripts/validate-formatting.sh 75 | -------------------------------------------------------------------------------- /.github/workflows/licence-check.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # https://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | name: Check license headers 16 | on: 17 | pull_request: 18 | push: 19 | branches: 20 | - main 21 | 22 | concurrency: 23 | group: ${{ github.workflow }}-${{ github.ref }} 24 | cancel-in-progress: true 25 | 26 | jobs: 27 | check-files-license-headers: 28 | runs-on: ubuntu-latest 29 | timeout-minutes: 30 30 | steps: 31 | - name: Checkout code 32 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 33 | - name: Setup go 34 | uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 35 | with: 36 | go-version: "^1.13.1" 37 | # Go is used by addlicense command (addlicense is used in melos run 38 | # check-license-header) 39 | - name: Run addlicense 40 | run: go install github.com/google/addlicense@latest 41 | - name: Install Flutter 42 | uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046 43 | with: 44 | flutter-version: "3.29.x" 45 | channel: "stable" 46 | cache: true 47 | - name: Install Melos 48 | uses: bluefireteam/melos-action@ec2c512a52c2f359186ca19bac0be977c44913e6 49 | with: 50 | # Running `melos bootstrap` is not needed because we use Melos just 51 | # for the `check-license-header` script. 52 | run-bootstrap: false 53 | melos-version: "6.0.0" 54 | - name: Check license header 55 | run: melos run check-license-header 56 | -------------------------------------------------------------------------------- /.github/workflows/scripts/validate-formatting.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2025 Google LLC 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | set -e 16 | 17 | if [[ $(git ls-files --modified) ]]; then 18 | echo "" 19 | echo "" 20 | echo "These files are not formatted correctly:" 21 | for f in $(git ls-files --modified); do 22 | echo "" 23 | echo "" 24 | echo "-----------------------------------------------------------------" 25 | echo "$f" 26 | echo "-----------------------------------------------------------------" 27 | echo "" 28 | git --no-pager diff --unified=0 --minimal $f 29 | echo "" 30 | echo "-----------------------------------------------------------------" 31 | echo "" 32 | echo "" 33 | done 34 | if [[ $GITHUB_WORKFLOW ]]; then 35 | git checkout . > /dev/null 2>&1 36 | fi 37 | echo "" 38 | echo "❌ Some files are incorrectly formatted, see above output." 39 | echo "" 40 | echo "To fix these locally, run: 'melos run format'." 41 | exit 1 42 | else 43 | echo "" 44 | echo "✅ All files are formatted correctly." 45 | fi 46 | -------------------------------------------------------------------------------- /.github/workflows/test-and-build.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # https://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | name: Build samples 16 | on: 17 | pull_request: 18 | push: 19 | branches: 20 | - main 21 | 22 | concurrency: 23 | group: ${{ github.workflow }}-${{ github.ref }} 24 | cancel-in-progress: true 25 | 26 | jobs: 27 | test-flutter: 28 | name: Run Flutter tests 29 | timeout-minutes: 45 30 | runs-on: 31 | labels: ubuntu-latest 32 | steps: 33 | - uses: actions/checkout@v4 34 | name: Checkout code 35 | - uses: actions/setup-java@v4 36 | name: Setup java 37 | with: 38 | distribution: "temurin" 39 | java-version: "17" 40 | cache: "gradle" 41 | - uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046 42 | name: Setup flutter 43 | with: 44 | flutter-version: "3.29.x" 45 | channel: "stable" 46 | cache: true 47 | - uses: bluefireteam/melos-action@ec2c512a52c2f359186ca19bac0be977c44913e6 48 | with: 49 | melos-version: "6.0.0" 50 | - name: "Run flutter test" 51 | run: melos run test 52 | 53 | build-android: 54 | name: Build Android 55 | needs: [test-flutter] 56 | if: contains(github.base_ref, 'main') 57 | timeout-minutes: 45 58 | runs-on: 59 | labels: ubuntu-latest 60 | env: 61 | MAPS_API_KEY: ${{ secrets.ACTIONS_API_KEY }} 62 | steps: 63 | - name: Checkout code 64 | uses: actions/checkout@v4 65 | - name: Setup java 66 | uses: actions/setup-java@v4 67 | with: 68 | distribution: "temurin" 69 | java-version: "17" 70 | cache: "gradle" 71 | - name: Setup flutter 72 | uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046 73 | with: 74 | flutter-version: "3.29.x" 75 | channel: "stable" 76 | cache: true 77 | - name: Setup melos 78 | uses: bluefireteam/melos-action@ec2c512a52c2f359186ca19bac0be977c44913e6 79 | with: 80 | melos-version: "6.0.0" 81 | - name: "Run build for Android" 82 | run: melos run flutter-build-android 83 | 84 | build-ios: 85 | name: Build iOS 86 | needs: [test-flutter] 87 | if: contains(github.base_ref, 'main') 88 | timeout-minutes: 90 89 | runs-on: 90 | labels: macos-latest-xlarge 91 | env: 92 | MAPS_API_KEY: ${{ secrets.ACTIONS_API_KEY }} 93 | steps: 94 | - name: Checkout code 95 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 96 | - name: Setup flutter 97 | uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046 98 | with: 99 | flutter-version: "3.29.x" 100 | channel: "stable" 101 | cache: true 102 | architecture: x64 103 | - name: Setup melos 104 | uses: bluefireteam/melos-action@ec2c512a52c2f359186ca19bac0be977c44913e6 105 | with: 106 | melos-version: "6.0.0" 107 | - name: Cache podfiles 108 | uses: actions/cache@v4 109 | with: 110 | path: "**/Pods" 111 | key: ${{ runner.os }}-pods-${{ hashFiles('**/*.podspec') }} 112 | restore-keys: | 113 | ${{ runner.os }}-pods- 114 | - name: Select XCode 16.1 115 | run: sudo xcode-select -s '/Applications/Xcode_16.1.0.app/Contents/Developer' 116 | - name: "Run build for iOS" 117 | run: melos run flutter-build-ios 118 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .build/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | .swiftpm/ 13 | migrate_working_dir/ 14 | 15 | # IntelliJ related 16 | *.iml 17 | *.ipr 18 | *.iws 19 | .idea/ 20 | 21 | # The .vscode folder contains launch configuration and tasks you configure in 22 | # VS Code which you may wish to be included in version control, so this line 23 | # is commented out by default. 24 | #.vscode/ 25 | 26 | # Flutter/Dart/Pub related 27 | **/doc/api/ 28 | **/ios/Flutter/.last_build_id 29 | .dart_tool/ 30 | .flutter-plugins 31 | .flutter-plugins-dependencies 32 | .pub-cache/ 33 | .pub/ 34 | /build/ 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Android Studio will place build artifacts here 43 | /android/app/debug 44 | /android/app/profile 45 | /android/app/release 46 | /android/app/.cxx 47 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: "17025dd88227cd9532c33fa78f5250d548d87e9a" 8 | channel: "stable" 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a 17 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a 18 | - platform: android 19 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a 20 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a 21 | - platform: ios 22 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a 23 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a 24 | - platform: linux 25 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a 26 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a 27 | - platform: macos 28 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a 29 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a 30 | - platform: web 31 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a 32 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a 33 | - platform: windows 34 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a 35 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Google Maps SDK for Flutter sample code authors 2 | # for copyright purposes. This file is distinct from the CONTRIBUTORS files. 3 | # See the latter for an explanation. 4 | 5 | # Names should be added to this file as 6 | # Name or Organization 7 | # The email address is not required for organizations. 8 | 9 | # Please keep the list sorted. 10 | 11 | Filip Hracek 12 | Google Inc. 13 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Google Maps SDK for Flutter Sample Code 2 | 3 | _See also: [Flutter's code of conduct](https://flutter.io/design-principles/#code-of-conduct)_ 4 | 5 | ## 1. Essential Setup for Contributors 6 | 7 | - **Operating System:** Linux, macOS, or Windows. 8 | - **Version Control:** [git](https://git-scm.com). 9 | - **Development Environment:** An IDE such as [Android Studio](https://developer.android.com/studio) or [Visual Studio Code](https://code.visualstudio.com/). 10 | 11 | ## 2. Setting Up Your Local Repository 12 | 13 | - **Preparation:** Before starting, make sure you have all dependencies installed as mentioned in the prior section. 14 | - **Fork the Repository:** Navigate to `https://github.com/googlemaps-samples/flutter-maps-samples` and create a fork in your GitHub account. 15 | - **SSH Key Configuration:** If your machine doesn't have an SSH key registered with GitHub, generate one following the instructions at [Generating SSH Keys on GitHub](https://help.github.com/articles/generating-ssh-keys/). 16 | - **Clone Your Fork:** Use the command `git clone git@github.com:/flutter-maps-samples.git` to clone the repository to your local machine. 17 | - **Add remote upstream:** Establish a link to the main repository for updates using command `git remote add upstream git@github.com:googlemaps-samples/flutter-maps-samples.git` This ensures you pull changes from the original source, not just your clone, when using git fetch and similar commands. 18 | 19 | ## 3. Install Melos 20 | 21 | This project leverages [Melos](https://github.com/invertase/melos) to manage the project and its dependencies. 22 | 23 | Run the following command to install Melos: 24 | 25 | ```bash 26 | dart pub global activate melos 27 | ``` 28 | 29 | ## 4. Running the Sample 30 | 31 | First, you have to provide your own Google Maps API key in the appropriate files. See `README.md` for more. 32 | 33 | After that, simply run the app: 34 | 35 | ```bash 36 | flutter run 37 | ``` 38 | 39 | ## 5. Running tests 40 | 41 | The sample doesn't really have business logic to test, but we do have a smoke test in `test/smoke_test.dart`. 42 | 43 | This test runs the app widget and visits every single demo sub-page. While this is far from a rigorous testing strategy, it does make it harder for runtime errors to slip by. 44 | 45 | You can run the test in headless mode: 46 | 47 | ```bash 48 | melos run test 49 | ``` 50 | 51 | Alternatively, you can run the smoke test on an actual device or an emulator. 52 | 53 | ```bash 54 | flutter run -d "your device" test/smoke_test.dart 55 | ``` 56 | 57 | This has the benefit of acting as a sort of integration test because on physical devices and emulators, the app will use method channels and platform views to actually show the UI in full. 58 | 59 | ## 6. Contributing code 60 | 61 | We welcome contributions through GitHub pull requests. 62 | 63 | Before working on any significant changes, please review the [Flutter style guide](https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md). These guidelines help maintain code consistency and avoid common pitfalls. 64 | 65 | To begin working on a patch, follow these steps: 66 | 67 | 1. Fetch the latest changes from the upstream repository: 68 | ```bash 69 | git fetch upstream 70 | ``` 71 | 72 | 2. Create a new branch based on the latest upstream master branch: 73 | ```bash 74 | git checkout upstream/master -b 75 | ``` 76 | 77 | 3. Start coding! 78 | 79 | Before committing your changes, it's important to ensure that your code passes the internal analyzer and formatting checks. You can run the following commands locally to identify any issues: 80 | 81 | - Run the analyzer check: 82 | ```bash 83 | melos run flutter-analyze 84 | ``` 85 | 86 | - Format your code: 87 | ```bash 88 | melos run format 89 | ``` 90 | 91 | Assuming all is successful, commit and push your code using the following commands: 92 | 93 | 1. Stage your changes: 94 | ```bash 95 | git add . 96 | ``` 97 | 98 | 2. Commit your changes with an informative commit message: 99 | ```bash 100 | git commit -m "" 101 | ``` 102 | 103 | 3. Push your changes to the remote repository: 104 | ```bash 105 | git push origin 106 | ``` 107 | 108 | To send us a pull request: 109 | 110 | - `git pull-request` (if you are using [Hub](http://github.com/github/hub/)) or 111 | go to `https://github.com/googlemaps-samples/flutter-maps-samples` and click the 112 | "Compare & pull request" button 113 | 114 | Please ensure that all your commits have detailed commit messages explaining the changes made. 115 | 116 | When naming the title of your pull request, please follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/) 117 | guide. For example, for a fix to a bug in the sample: 118 | 119 | `fix: Fixed a bug!` 120 | 121 | Automated tests will be run on your contributions using GitHub Actions. Depending on 122 | your code changes, various tests will be performed automatically. 123 | 124 | Once you have received an LGTM (Looks Good To Me) from a project maintainer and once your pull request has passed all automated tests, please wait for one of the package maintainers to merge your changes. 125 | 126 | Before contributing, please ensure that you have completed the 127 | [Contributor License Agreement](https://cla.developers.google.com/clas). 128 | This can be done online and only takes a few moments. 129 | If you are submitting code for the first time, please add your (or your 130 | organization's) name and contact information to the [AUTHORS](AUTHORS) file. 131 | 132 | This project uses Google's `addlicense` [here](https://github.com/google/addlicense) tool to add the license header to all necessary files. Running `addlicense` is a required step before committing any new files. 133 | 134 | To install `addlicense`, run: 135 | 136 | ```bash 137 | go install github.com/google/addlicense@latest 138 | ``` 139 | 140 | Make sure to include `$HOME/go/bin` in your `PATH` environment variable. 141 | If you are using Bash on Linux or macOS, add `export PATH="$HOME/go/bin:$PATH"` to your `.bash_profile`. 142 | 143 | To add the license header to all files, run the following command from the root of the repository: 144 | 145 | ```bash 146 | melos run add-license-header 147 | ``` 148 | 149 | This command uses `addlicense` with all necessary flags. 150 | 151 | To check the license header of all files, run from the root of the repository: 152 | ```bash 153 | melos run check-license-header 154 | ``` 155 | 156 | ## 7. Contributing documentation 157 | 158 | We welcome contributions to the plugin documentation. The documentation for this project is generated using Dart Docs. All documentation for the app-facing API is described in Dart files. 159 | 160 | Please refer to the "Contributing code" section above for instructions on how to prepare and submit a pull request to the repository. 161 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![GitHub contributors](https://img.shields.io/github/contributors/googlemaps-samples/flutter-maps-samples) 2 | ![Apache-2.0](https://img.shields.io/badge/license-Apache-blue) 3 | [![Build samples](https://github.com/googlemaps-samples/flutter-maps-samples/actions/workflows/test-and-build.yaml/badge.svg?branch=main)](https://github.com/googlemaps-samples/flutter-maps-samples/actions/workflows/test-and-build.yaml) 4 | [![Discord](https://img.shields.io/discord/676948200904589322)](https://discord.gg/hYsWbmk) 5 | 6 | Google Maps SDK for Flutter sample code 7 | ======================================= 8 | 9 | Screenshot of the Google Maps Flutter sample running on an Android device, an iOS device, and in a desktop browser. 10 | 11 | This repository contains sample code demonstrating how to use 12 | [Google Maps SDK for Flutter](https://developers.google.com/maps/flutter-package/overview) 13 | and the [`google_maps_flutter` plugin](https://pub.dev/packages/google_maps_flutter). 14 | 15 | Getting Started 16 | --------------- 17 | 18 | 1. **Download** the samples by cloning this repository 19 | 2. **Open** the project in your IDE 20 | 3. The sample app requires that you **add your own Google Maps API key** into 21 | - `app/src/main/AndroidManifest.xml`, 22 | - `ios/Runner/AppDelegate.swift` and 23 | - `web/index.html`. 24 | 25 | See [Get Started](https://developers.google.com/maps/get-started) 26 | docs for more instructions. 27 | 28 | Support 29 | ------- 30 | 31 | - Stack Overflow: https://stackoverflow.com/questions/tagged/flutter+google-maps 32 | - Discord: https://discord.gg/hYsWbmk 33 | 34 | If you have discovered an issue with the Google Maps Platform, please see 35 | the resources here: https://developers.google.com/maps/support/ 36 | 37 | If you've found an issue with the Google Maps SDK for Flutter, 38 | or the `google_maps_flutter` plugin, 39 | please [file an issue](https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22). 40 | 41 | If you've found an error in this sample repository, 42 | please [file an issue](https://github.com/googlemaps-samples/flutter-maps-samples/issues). 43 | 44 | Patches are encouraged, and may be submitted according to the instructions in 45 | CONTRIBUTING.md. 46 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # https://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | include: package:flutter_lints/flutter.yaml 16 | 17 | linter: 18 | rules: 19 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 20 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 21 | 22 | # Additional information about this file can be found at 23 | # https://dart.dev/guides/language/analysis-options 24 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/to/reference-keystore 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | plugins { 16 | id "com.android.application" 17 | id "kotlin-android" 18 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. 19 | id "dev.flutter.flutter-gradle-plugin" 20 | } 21 | 22 | android { 23 | namespace = "com.example.flutter_maps_samples" 24 | compileSdk = flutter.compileSdkVersion 25 | // The Google Maps plugin needs a higher version of NDK than 26 | // Flutter's default (flutter.ndkVersion). 27 | ndkVersion = "27.0.12077973" 28 | 29 | compileOptions { 30 | sourceCompatibility = JavaVersion.VERSION_17 31 | targetCompatibility = JavaVersion.VERSION_17 32 | } 33 | 34 | kotlinOptions { 35 | jvmTarget = JavaVersion.VERSION_17 36 | } 37 | 38 | defaultConfig { 39 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 40 | applicationId = "com.example.flutter_maps_samples" 41 | // You can update the following values to match your application needs. 42 | // For more information, see: https://flutter.dev/to/review-gradle-config. 43 | minSdk = 21 44 | targetSdk = flutter.targetSdkVersion 45 | versionCode = flutter.versionCode 46 | versionName = flutter.versionName 47 | } 48 | 49 | buildTypes { 50 | release { 51 | // TODO: Add your own signing config for the release build. 52 | // Signing with the debug keys for now, so `flutter run --release` works. 53 | signingConfig = signingConfigs.debug 54 | } 55 | } 56 | } 57 | 58 | flutter { 59 | source = "../.." 60 | } 61 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 21 | 22 | 26 | 35 | 39 | 43 | 44 | 45 | 46 | 47 | 48 | 50 | 53 | 54 | 56 | 57 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/flutter_maps_samples/MainActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.flutter_maps_samples 18 | 19 | import io.flutter.embedding.android.FlutterActivity 20 | 21 | class MainActivity: FlutterActivity() 22 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 28 | 29 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 28 | 29 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 25 | 31 | 34 | 35 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 25 | 31 | 34 | 35 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | rootProject.buildDir = "../build" 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(":app") 28 | } 29 | 30 | tasks.register("clean", Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | pluginManagement { 16 | def flutterSdkPath = { 17 | def properties = new Properties() 18 | file("local.properties").withInputStream { properties.load(it) } 19 | def flutterSdkPath = properties.getProperty("flutter.sdk") 20 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 21 | return flutterSdkPath 22 | }() 23 | 24 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 25 | 26 | repositories { 27 | google() 28 | mavenCentral() 29 | gradlePluginPortal() 30 | } 31 | } 32 | 33 | plugins { 34 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 35 | id "com.android.application" version "8.9.0" apply false 36 | id "org.jetbrains.kotlin.android" version "2.1.10" apply false 37 | } 38 | 39 | include ":app" 40 | -------------------------------------------------------------------------------- /assets/icon_flutter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/assets/icon_flutter.png -------------------------------------------------------------------------------- /header_template.txt: -------------------------------------------------------------------------------- 1 | Copyright {{.Year}} Google LLC 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | https://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '12.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | target 'RunnerTests' do 36 | inherit! :search_paths 37 | end 38 | end 39 | 40 | post_install do |installer| 41 | installer.pods_project.targets.each do |target| 42 | flutter_additional_ios_build_settings(target) 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - Google-Maps-iOS-Utils (6.1.0): 4 | - GoogleMaps (~> 9.0) 5 | - google_maps_flutter_ios (0.0.1): 6 | - Flutter 7 | - Google-Maps-iOS-Utils (< 7.0, >= 5.0) 8 | - GoogleMaps (< 10.0, >= 8.4) 9 | - GoogleMaps (9.2.0): 10 | - GoogleMaps/Maps (= 9.2.0) 11 | - GoogleMaps/Maps (9.2.0) 12 | 13 | DEPENDENCIES: 14 | - Flutter (from `Flutter`) 15 | - google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`) 16 | 17 | SPEC REPOS: 18 | trunk: 19 | - Google-Maps-iOS-Utils 20 | - GoogleMaps 21 | 22 | EXTERNAL SOURCES: 23 | Flutter: 24 | :path: Flutter 25 | google_maps_flutter_ios: 26 | :path: ".symlinks/plugins/google_maps_flutter_ios/ios" 27 | 28 | SPEC CHECKSUMS: 29 | Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 30 | Google-Maps-iOS-Utils: 0a484b05ed21d88c9f9ebbacb007956edd508a96 31 | google_maps_flutter_ios: 0291eb2aa252298a769b04d075e4a9d747ff7264 32 | GoogleMaps: 634ec3ca99698b31ca2253d64f017217d70cfb38 33 | 34 | PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796 35 | 36 | COCOAPODS: 1.16.2 37 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 12 | 381E81CF81CBA4ED16B3D01F /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D45BBC6DAF10791BFC427B3B /* Pods_Runner.framework */; }; 13 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 14 | 6E8063952175BAF143E9FF55 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2C0214F4738A6DFF74B8C260 /* Pods_RunnerTests.framework */; }; 15 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 16 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 17 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 18 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 97C146E61CF9000F007C117D /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 97C146ED1CF9000F007C117D; 27 | remoteInfo = Runner; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXCopyFilesBuildPhase section */ 32 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 33 | isa = PBXCopyFilesBuildPhase; 34 | buildActionMask = 2147483647; 35 | dstPath = ""; 36 | dstSubfolderSpec = 10; 37 | files = ( 38 | ); 39 | name = "Embed Frameworks"; 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXCopyFilesBuildPhase section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 46 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 47 | 2C0214F4738A6DFF74B8C260 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 49 | 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 51 | 745896E593AA369BD5317A61 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 52 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 53 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 54 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 55 | 7D0DCF06A01280B20DA5FCEF /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; 56 | 8AC74E3151A30D62F0BA57DA /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 57 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 58 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 59 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 61 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 62 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 63 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 64 | A2106D85ACD9E75981AD7223 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; 65 | A5DB55A84BA082CF0DB45962 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 66 | AE38E0D2FE695CE3E80D5A9C /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; 67 | D45BBC6DAF10791BFC427B3B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 68 | /* End PBXFileReference section */ 69 | 70 | /* Begin PBXFrameworksBuildPhase section */ 71 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | 381E81CF81CBA4ED16B3D01F /* Pods_Runner.framework in Frameworks */, 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | D3CF85474DC45ECF2BE24A58 /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | 6E8063952175BAF143E9FF55 /* Pods_RunnerTests.framework in Frameworks */, 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | /* End PBXFrameworksBuildPhase section */ 88 | 89 | /* Begin PBXGroup section */ 90 | 331C8082294A63A400263BE5 /* RunnerTests */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 331C807B294A618700263BE5 /* RunnerTests.swift */, 94 | ); 95 | path = RunnerTests; 96 | sourceTree = ""; 97 | }; 98 | 7A1420815DB0F30E632B0868 /* Pods */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 745896E593AA369BD5317A61 /* Pods-Runner.debug.xcconfig */, 102 | A5DB55A84BA082CF0DB45962 /* Pods-Runner.release.xcconfig */, 103 | 8AC74E3151A30D62F0BA57DA /* Pods-Runner.profile.xcconfig */, 104 | A2106D85ACD9E75981AD7223 /* Pods-RunnerTests.debug.xcconfig */, 105 | 7D0DCF06A01280B20DA5FCEF /* Pods-RunnerTests.release.xcconfig */, 106 | AE38E0D2FE695CE3E80D5A9C /* Pods-RunnerTests.profile.xcconfig */, 107 | ); 108 | name = Pods; 109 | path = Pods; 110 | sourceTree = ""; 111 | }; 112 | 973F070F81EB4E6FBF608461 /* Frameworks */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | D45BBC6DAF10791BFC427B3B /* Pods_Runner.framework */, 116 | 2C0214F4738A6DFF74B8C260 /* Pods_RunnerTests.framework */, 117 | ); 118 | name = Frameworks; 119 | sourceTree = ""; 120 | }; 121 | 9740EEB11CF90186004384FC /* Flutter */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 125 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 126 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 127 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 128 | ); 129 | name = Flutter; 130 | sourceTree = ""; 131 | }; 132 | 97C146E51CF9000F007C117D = { 133 | isa = PBXGroup; 134 | children = ( 135 | 9740EEB11CF90186004384FC /* Flutter */, 136 | 97C146F01CF9000F007C117D /* Runner */, 137 | 97C146EF1CF9000F007C117D /* Products */, 138 | 331C8082294A63A400263BE5 /* RunnerTests */, 139 | 7A1420815DB0F30E632B0868 /* Pods */, 140 | 973F070F81EB4E6FBF608461 /* Frameworks */, 141 | ); 142 | sourceTree = ""; 143 | }; 144 | 97C146EF1CF9000F007C117D /* Products */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 97C146EE1CF9000F007C117D /* Runner.app */, 148 | 331C8081294A63A400263BE5 /* RunnerTests.xctest */, 149 | ); 150 | name = Products; 151 | sourceTree = ""; 152 | }; 153 | 97C146F01CF9000F007C117D /* Runner */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 157 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 158 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 159 | 97C147021CF9000F007C117D /* Info.plist */, 160 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 161 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 162 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 163 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 164 | ); 165 | path = Runner; 166 | sourceTree = ""; 167 | }; 168 | /* End PBXGroup section */ 169 | 170 | /* Begin PBXNativeTarget section */ 171 | 331C8080294A63A400263BE5 /* RunnerTests */ = { 172 | isa = PBXNativeTarget; 173 | buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; 174 | buildPhases = ( 175 | 1E18A6DAD47CEA5E72FB13AD /* [CP] Check Pods Manifest.lock */, 176 | 331C807D294A63A400263BE5 /* Sources */, 177 | 331C807F294A63A400263BE5 /* Resources */, 178 | D3CF85474DC45ECF2BE24A58 /* Frameworks */, 179 | ); 180 | buildRules = ( 181 | ); 182 | dependencies = ( 183 | 331C8086294A63A400263BE5 /* PBXTargetDependency */, 184 | ); 185 | name = RunnerTests; 186 | productName = RunnerTests; 187 | productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; 188 | productType = "com.apple.product-type.bundle.unit-test"; 189 | }; 190 | 97C146ED1CF9000F007C117D /* Runner */ = { 191 | isa = PBXNativeTarget; 192 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 193 | buildPhases = ( 194 | B992C2813286B72559CDFEFC /* [CP] Check Pods Manifest.lock */, 195 | 9740EEB61CF901F6004384FC /* Run Script */, 196 | 97C146EA1CF9000F007C117D /* Sources */, 197 | 97C146EB1CF9000F007C117D /* Frameworks */, 198 | 97C146EC1CF9000F007C117D /* Resources */, 199 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 200 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 201 | 902BB598F9052A49EE41F535 /* [CP] Copy Pods Resources */, 202 | ); 203 | buildRules = ( 204 | ); 205 | dependencies = ( 206 | ); 207 | name = Runner; 208 | productName = Runner; 209 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 210 | productType = "com.apple.product-type.application"; 211 | }; 212 | /* End PBXNativeTarget section */ 213 | 214 | /* Begin PBXProject section */ 215 | 97C146E61CF9000F007C117D /* Project object */ = { 216 | isa = PBXProject; 217 | attributes = { 218 | BuildIndependentTargetsInParallel = YES; 219 | LastUpgradeCheck = 1510; 220 | ORGANIZATIONNAME = ""; 221 | TargetAttributes = { 222 | 331C8080294A63A400263BE5 = { 223 | CreatedOnToolsVersion = 14.0; 224 | TestTargetID = 97C146ED1CF9000F007C117D; 225 | }; 226 | 97C146ED1CF9000F007C117D = { 227 | CreatedOnToolsVersion = 7.3.1; 228 | LastSwiftMigration = 1100; 229 | }; 230 | }; 231 | }; 232 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 233 | compatibilityVersion = "Xcode 9.3"; 234 | developmentRegion = en; 235 | hasScannedForEncodings = 0; 236 | knownRegions = ( 237 | en, 238 | Base, 239 | ); 240 | mainGroup = 97C146E51CF9000F007C117D; 241 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 242 | projectDirPath = ""; 243 | projectRoot = ""; 244 | targets = ( 245 | 97C146ED1CF9000F007C117D /* Runner */, 246 | 331C8080294A63A400263BE5 /* RunnerTests */, 247 | ); 248 | }; 249 | /* End PBXProject section */ 250 | 251 | /* Begin PBXResourcesBuildPhase section */ 252 | 331C807F294A63A400263BE5 /* Resources */ = { 253 | isa = PBXResourcesBuildPhase; 254 | buildActionMask = 2147483647; 255 | files = ( 256 | ); 257 | runOnlyForDeploymentPostprocessing = 0; 258 | }; 259 | 97C146EC1CF9000F007C117D /* Resources */ = { 260 | isa = PBXResourcesBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 264 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 265 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 266 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | }; 270 | /* End PBXResourcesBuildPhase section */ 271 | 272 | /* Begin PBXShellScriptBuildPhase section */ 273 | 1E18A6DAD47CEA5E72FB13AD /* [CP] Check Pods Manifest.lock */ = { 274 | isa = PBXShellScriptBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | ); 278 | inputFileListPaths = ( 279 | ); 280 | inputPaths = ( 281 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 282 | "${PODS_ROOT}/Manifest.lock", 283 | ); 284 | name = "[CP] Check Pods Manifest.lock"; 285 | outputFileListPaths = ( 286 | ); 287 | outputPaths = ( 288 | "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", 289 | ); 290 | runOnlyForDeploymentPostprocessing = 0; 291 | shellPath = /bin/sh; 292 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 293 | showEnvVarsInLog = 0; 294 | }; 295 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 296 | isa = PBXShellScriptBuildPhase; 297 | alwaysOutOfDate = 1; 298 | buildActionMask = 2147483647; 299 | files = ( 300 | ); 301 | inputPaths = ( 302 | "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", 303 | ); 304 | name = "Thin Binary"; 305 | outputPaths = ( 306 | ); 307 | runOnlyForDeploymentPostprocessing = 0; 308 | shellPath = /bin/sh; 309 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 310 | }; 311 | 902BB598F9052A49EE41F535 /* [CP] Copy Pods Resources */ = { 312 | isa = PBXShellScriptBuildPhase; 313 | buildActionMask = 2147483647; 314 | files = ( 315 | ); 316 | inputFileListPaths = ( 317 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", 318 | ); 319 | name = "[CP] Copy Pods Resources"; 320 | outputFileListPaths = ( 321 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", 322 | ); 323 | runOnlyForDeploymentPostprocessing = 0; 324 | shellPath = /bin/sh; 325 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; 326 | showEnvVarsInLog = 0; 327 | }; 328 | 9740EEB61CF901F6004384FC /* Run Script */ = { 329 | isa = PBXShellScriptBuildPhase; 330 | alwaysOutOfDate = 1; 331 | buildActionMask = 2147483647; 332 | files = ( 333 | ); 334 | inputPaths = ( 335 | ); 336 | name = "Run Script"; 337 | outputPaths = ( 338 | ); 339 | runOnlyForDeploymentPostprocessing = 0; 340 | shellPath = /bin/sh; 341 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 342 | }; 343 | B992C2813286B72559CDFEFC /* [CP] Check Pods Manifest.lock */ = { 344 | isa = PBXShellScriptBuildPhase; 345 | buildActionMask = 2147483647; 346 | files = ( 347 | ); 348 | inputFileListPaths = ( 349 | ); 350 | inputPaths = ( 351 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 352 | "${PODS_ROOT}/Manifest.lock", 353 | ); 354 | name = "[CP] Check Pods Manifest.lock"; 355 | outputFileListPaths = ( 356 | ); 357 | outputPaths = ( 358 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 359 | ); 360 | runOnlyForDeploymentPostprocessing = 0; 361 | shellPath = /bin/sh; 362 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 363 | showEnvVarsInLog = 0; 364 | }; 365 | /* End PBXShellScriptBuildPhase section */ 366 | 367 | /* Begin PBXSourcesBuildPhase section */ 368 | 331C807D294A63A400263BE5 /* Sources */ = { 369 | isa = PBXSourcesBuildPhase; 370 | buildActionMask = 2147483647; 371 | files = ( 372 | 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, 373 | ); 374 | runOnlyForDeploymentPostprocessing = 0; 375 | }; 376 | 97C146EA1CF9000F007C117D /* Sources */ = { 377 | isa = PBXSourcesBuildPhase; 378 | buildActionMask = 2147483647; 379 | files = ( 380 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 381 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 382 | ); 383 | runOnlyForDeploymentPostprocessing = 0; 384 | }; 385 | /* End PBXSourcesBuildPhase section */ 386 | 387 | /* Begin PBXTargetDependency section */ 388 | 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { 389 | isa = PBXTargetDependency; 390 | target = 97C146ED1CF9000F007C117D /* Runner */; 391 | targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; 392 | }; 393 | /* End PBXTargetDependency section */ 394 | 395 | /* Begin PBXVariantGroup section */ 396 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 397 | isa = PBXVariantGroup; 398 | children = ( 399 | 97C146FB1CF9000F007C117D /* Base */, 400 | ); 401 | name = Main.storyboard; 402 | sourceTree = ""; 403 | }; 404 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 405 | isa = PBXVariantGroup; 406 | children = ( 407 | 97C147001CF9000F007C117D /* Base */, 408 | ); 409 | name = LaunchScreen.storyboard; 410 | sourceTree = ""; 411 | }; 412 | /* End PBXVariantGroup section */ 413 | 414 | /* Begin XCBuildConfiguration section */ 415 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 416 | isa = XCBuildConfiguration; 417 | buildSettings = { 418 | ALWAYS_SEARCH_USER_PATHS = NO; 419 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 420 | CLANG_ANALYZER_NONNULL = YES; 421 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 422 | CLANG_CXX_LIBRARY = "libc++"; 423 | CLANG_ENABLE_MODULES = YES; 424 | CLANG_ENABLE_OBJC_ARC = YES; 425 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 426 | CLANG_WARN_BOOL_CONVERSION = YES; 427 | CLANG_WARN_COMMA = YES; 428 | CLANG_WARN_CONSTANT_CONVERSION = YES; 429 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 430 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 431 | CLANG_WARN_EMPTY_BODY = YES; 432 | CLANG_WARN_ENUM_CONVERSION = YES; 433 | CLANG_WARN_INFINITE_RECURSION = YES; 434 | CLANG_WARN_INT_CONVERSION = YES; 435 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 436 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 437 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 438 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 439 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 440 | CLANG_WARN_STRICT_PROTOTYPES = YES; 441 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 442 | CLANG_WARN_UNREACHABLE_CODE = YES; 443 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 444 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 445 | COPY_PHASE_STRIP = NO; 446 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 447 | ENABLE_NS_ASSERTIONS = NO; 448 | ENABLE_STRICT_OBJC_MSGSEND = YES; 449 | ENABLE_USER_SCRIPT_SANDBOXING = NO; 450 | GCC_C_LANGUAGE_STANDARD = gnu99; 451 | GCC_NO_COMMON_BLOCKS = YES; 452 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 453 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 454 | GCC_WARN_UNDECLARED_SELECTOR = YES; 455 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 456 | GCC_WARN_UNUSED_FUNCTION = YES; 457 | GCC_WARN_UNUSED_VARIABLE = YES; 458 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 459 | MTL_ENABLE_DEBUG_INFO = NO; 460 | SDKROOT = iphoneos; 461 | SUPPORTED_PLATFORMS = iphoneos; 462 | TARGETED_DEVICE_FAMILY = "1,2"; 463 | VALIDATE_PRODUCT = YES; 464 | }; 465 | name = Profile; 466 | }; 467 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 468 | isa = XCBuildConfiguration; 469 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 470 | buildSettings = { 471 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 472 | CLANG_ENABLE_MODULES = YES; 473 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 474 | DEVELOPMENT_TEAM = 3QUFHCJT7P; 475 | ENABLE_BITCODE = NO; 476 | INFOPLIST_FILE = Runner/Info.plist; 477 | IPHONEOS_DEPLOYMENT_TARGET = 15.6; 478 | LD_RUNPATH_SEARCH_PATHS = ( 479 | "$(inherited)", 480 | "@executable_path/Frameworks", 481 | ); 482 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterMapsSamples; 483 | PRODUCT_NAME = "$(TARGET_NAME)"; 484 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 485 | SWIFT_VERSION = 5.0; 486 | VERSIONING_SYSTEM = "apple-generic"; 487 | }; 488 | name = Profile; 489 | }; 490 | 331C8088294A63A400263BE5 /* Debug */ = { 491 | isa = XCBuildConfiguration; 492 | baseConfigurationReference = A2106D85ACD9E75981AD7223 /* Pods-RunnerTests.debug.xcconfig */; 493 | buildSettings = { 494 | BUNDLE_LOADER = "$(TEST_HOST)"; 495 | CODE_SIGN_STYLE = Automatic; 496 | CURRENT_PROJECT_VERSION = 1; 497 | GENERATE_INFOPLIST_FILE = YES; 498 | MARKETING_VERSION = 1.0; 499 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterMapsSamples.RunnerTests; 500 | PRODUCT_NAME = "$(TARGET_NAME)"; 501 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 502 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 503 | SWIFT_VERSION = 5.0; 504 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; 505 | }; 506 | name = Debug; 507 | }; 508 | 331C8089294A63A400263BE5 /* Release */ = { 509 | isa = XCBuildConfiguration; 510 | baseConfigurationReference = 7D0DCF06A01280B20DA5FCEF /* Pods-RunnerTests.release.xcconfig */; 511 | buildSettings = { 512 | BUNDLE_LOADER = "$(TEST_HOST)"; 513 | CODE_SIGN_STYLE = Automatic; 514 | CURRENT_PROJECT_VERSION = 1; 515 | GENERATE_INFOPLIST_FILE = YES; 516 | MARKETING_VERSION = 1.0; 517 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterMapsSamples.RunnerTests; 518 | PRODUCT_NAME = "$(TARGET_NAME)"; 519 | SWIFT_VERSION = 5.0; 520 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; 521 | }; 522 | name = Release; 523 | }; 524 | 331C808A294A63A400263BE5 /* Profile */ = { 525 | isa = XCBuildConfiguration; 526 | baseConfigurationReference = AE38E0D2FE695CE3E80D5A9C /* Pods-RunnerTests.profile.xcconfig */; 527 | buildSettings = { 528 | BUNDLE_LOADER = "$(TEST_HOST)"; 529 | CODE_SIGN_STYLE = Automatic; 530 | CURRENT_PROJECT_VERSION = 1; 531 | GENERATE_INFOPLIST_FILE = YES; 532 | MARKETING_VERSION = 1.0; 533 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterMapsSamples.RunnerTests; 534 | PRODUCT_NAME = "$(TARGET_NAME)"; 535 | SWIFT_VERSION = 5.0; 536 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; 537 | }; 538 | name = Profile; 539 | }; 540 | 97C147031CF9000F007C117D /* Debug */ = { 541 | isa = XCBuildConfiguration; 542 | buildSettings = { 543 | ALWAYS_SEARCH_USER_PATHS = NO; 544 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 545 | CLANG_ANALYZER_NONNULL = YES; 546 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 547 | CLANG_CXX_LIBRARY = "libc++"; 548 | CLANG_ENABLE_MODULES = YES; 549 | CLANG_ENABLE_OBJC_ARC = YES; 550 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 551 | CLANG_WARN_BOOL_CONVERSION = YES; 552 | CLANG_WARN_COMMA = YES; 553 | CLANG_WARN_CONSTANT_CONVERSION = YES; 554 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 555 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 556 | CLANG_WARN_EMPTY_BODY = YES; 557 | CLANG_WARN_ENUM_CONVERSION = YES; 558 | CLANG_WARN_INFINITE_RECURSION = YES; 559 | CLANG_WARN_INT_CONVERSION = YES; 560 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 561 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 562 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 563 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 564 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 565 | CLANG_WARN_STRICT_PROTOTYPES = YES; 566 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 567 | CLANG_WARN_UNREACHABLE_CODE = YES; 568 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 569 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 570 | COPY_PHASE_STRIP = NO; 571 | DEBUG_INFORMATION_FORMAT = dwarf; 572 | ENABLE_STRICT_OBJC_MSGSEND = YES; 573 | ENABLE_TESTABILITY = YES; 574 | ENABLE_USER_SCRIPT_SANDBOXING = NO; 575 | GCC_C_LANGUAGE_STANDARD = gnu99; 576 | GCC_DYNAMIC_NO_PIC = NO; 577 | GCC_NO_COMMON_BLOCKS = YES; 578 | GCC_OPTIMIZATION_LEVEL = 0; 579 | GCC_PREPROCESSOR_DEFINITIONS = ( 580 | "DEBUG=1", 581 | "$(inherited)", 582 | ); 583 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 584 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 585 | GCC_WARN_UNDECLARED_SELECTOR = YES; 586 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 587 | GCC_WARN_UNUSED_FUNCTION = YES; 588 | GCC_WARN_UNUSED_VARIABLE = YES; 589 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 590 | MTL_ENABLE_DEBUG_INFO = YES; 591 | ONLY_ACTIVE_ARCH = YES; 592 | SDKROOT = iphoneos; 593 | TARGETED_DEVICE_FAMILY = "1,2"; 594 | }; 595 | name = Debug; 596 | }; 597 | 97C147041CF9000F007C117D /* Release */ = { 598 | isa = XCBuildConfiguration; 599 | buildSettings = { 600 | ALWAYS_SEARCH_USER_PATHS = NO; 601 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 602 | CLANG_ANALYZER_NONNULL = YES; 603 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 604 | CLANG_CXX_LIBRARY = "libc++"; 605 | CLANG_ENABLE_MODULES = YES; 606 | CLANG_ENABLE_OBJC_ARC = YES; 607 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 608 | CLANG_WARN_BOOL_CONVERSION = YES; 609 | CLANG_WARN_COMMA = YES; 610 | CLANG_WARN_CONSTANT_CONVERSION = YES; 611 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 612 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 613 | CLANG_WARN_EMPTY_BODY = YES; 614 | CLANG_WARN_ENUM_CONVERSION = YES; 615 | CLANG_WARN_INFINITE_RECURSION = YES; 616 | CLANG_WARN_INT_CONVERSION = YES; 617 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 618 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 619 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 620 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 621 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 622 | CLANG_WARN_STRICT_PROTOTYPES = YES; 623 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 624 | CLANG_WARN_UNREACHABLE_CODE = YES; 625 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 626 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 627 | COPY_PHASE_STRIP = NO; 628 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 629 | ENABLE_NS_ASSERTIONS = NO; 630 | ENABLE_STRICT_OBJC_MSGSEND = YES; 631 | ENABLE_USER_SCRIPT_SANDBOXING = NO; 632 | GCC_C_LANGUAGE_STANDARD = gnu99; 633 | GCC_NO_COMMON_BLOCKS = YES; 634 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 635 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 636 | GCC_WARN_UNDECLARED_SELECTOR = YES; 637 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 638 | GCC_WARN_UNUSED_FUNCTION = YES; 639 | GCC_WARN_UNUSED_VARIABLE = YES; 640 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 641 | MTL_ENABLE_DEBUG_INFO = NO; 642 | SDKROOT = iphoneos; 643 | SUPPORTED_PLATFORMS = iphoneos; 644 | SWIFT_COMPILATION_MODE = wholemodule; 645 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 646 | TARGETED_DEVICE_FAMILY = "1,2"; 647 | VALIDATE_PRODUCT = YES; 648 | }; 649 | name = Release; 650 | }; 651 | 97C147061CF9000F007C117D /* Debug */ = { 652 | isa = XCBuildConfiguration; 653 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 654 | buildSettings = { 655 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 656 | CLANG_ENABLE_MODULES = YES; 657 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 658 | DEVELOPMENT_TEAM = 3QUFHCJT7P; 659 | ENABLE_BITCODE = NO; 660 | INFOPLIST_FILE = Runner/Info.plist; 661 | IPHONEOS_DEPLOYMENT_TARGET = 15.6; 662 | LD_RUNPATH_SEARCH_PATHS = ( 663 | "$(inherited)", 664 | "@executable_path/Frameworks", 665 | ); 666 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterMapsSamples; 667 | PRODUCT_NAME = "$(TARGET_NAME)"; 668 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 669 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 670 | SWIFT_VERSION = 5.0; 671 | VERSIONING_SYSTEM = "apple-generic"; 672 | }; 673 | name = Debug; 674 | }; 675 | 97C147071CF9000F007C117D /* Release */ = { 676 | isa = XCBuildConfiguration; 677 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 678 | buildSettings = { 679 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 680 | CLANG_ENABLE_MODULES = YES; 681 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 682 | DEVELOPMENT_TEAM = 3QUFHCJT7P; 683 | ENABLE_BITCODE = NO; 684 | INFOPLIST_FILE = Runner/Info.plist; 685 | IPHONEOS_DEPLOYMENT_TARGET = 15.6; 686 | LD_RUNPATH_SEARCH_PATHS = ( 687 | "$(inherited)", 688 | "@executable_path/Frameworks", 689 | ); 690 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterMapsSamples; 691 | PRODUCT_NAME = "$(TARGET_NAME)"; 692 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 693 | SWIFT_VERSION = 5.0; 694 | VERSIONING_SYSTEM = "apple-generic"; 695 | }; 696 | name = Release; 697 | }; 698 | /* End XCBuildConfiguration section */ 699 | 700 | /* Begin XCConfigurationList section */ 701 | 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { 702 | isa = XCConfigurationList; 703 | buildConfigurations = ( 704 | 331C8088294A63A400263BE5 /* Debug */, 705 | 331C8089294A63A400263BE5 /* Release */, 706 | 331C808A294A63A400263BE5 /* Profile */, 707 | ); 708 | defaultConfigurationIsVisible = 0; 709 | defaultConfigurationName = Release; 710 | }; 711 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 712 | isa = XCConfigurationList; 713 | buildConfigurations = ( 714 | 97C147031CF9000F007C117D /* Debug */, 715 | 97C147041CF9000F007C117D /* Release */, 716 | 249021D3217E4FDB00AE95B9 /* Profile */, 717 | ); 718 | defaultConfigurationIsVisible = 0; 719 | defaultConfigurationName = Release; 720 | }; 721 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 722 | isa = XCConfigurationList; 723 | buildConfigurations = ( 724 | 97C147061CF9000F007C117D /* Debug */, 725 | 97C147071CF9000F007C117D /* Release */, 726 | 249021D4217E4FDB00AE95B9 /* Profile */, 727 | ); 728 | defaultConfigurationIsVisible = 0; 729 | defaultConfigurationName = Release; 730 | }; 731 | /* End XCConfigurationList section */ 732 | }; 733 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 734 | } 735 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 64 | 66 | 72 | 73 | 74 | 75 | 81 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import Flutter 16 | import UIKit 17 | import GoogleMaps 18 | 19 | @main 20 | @objc class AppDelegate: FlutterAppDelegate { 21 | override func application( 22 | _ application: UIApplication, 23 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 24 | ) -> Bool { 25 | GMSServices.provideAPIKey("AIzaSyAS1zaJLBxG14nJUM8LLtDjN2imbFugmLk") 26 | GeneratedPluginRegistrant.register(with: self) 27 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Flutter Maps Samples 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | flutter_maps_samples 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | CADisableMinimumFrameDurationOnPhone 45 | 46 | UIApplicationSupportsIndirectInputEvents 47 | 48 | NSLocationWhenInUseUsageDescription 49 | Your location is required in order to show your current location on the map. 50 | 51 | 52 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "GeneratedPluginRegistrant.h" 18 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import Flutter 16 | import UIKit 17 | import XCTest 18 | 19 | class RunnerTests: XCTestCase { 20 | 21 | func testExample() { 22 | // If you add code to the Runner application, consider adding tests here. 23 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'package:flutter/material.dart'; 16 | import 'package:flutter_maps_samples/samples/basic.dart'; 17 | import 'package:flutter_maps_samples/samples/camera_animate.dart'; 18 | import 'package:flutter_maps_samples/samples/camera_move.dart'; 19 | import 'package:flutter_maps_samples/samples/handle_events.dart'; 20 | import 'package:flutter_maps_samples/samples/map_controller_async.dart'; 21 | import 'package:flutter_maps_samples/samples/map_id.dart'; 22 | import 'package:flutter_maps_samples/samples/map_type.dart'; 23 | import 'package:flutter_maps_samples/samples/marker.dart'; 24 | import 'package:flutter_maps_samples/samples/marker_clusters.dart'; 25 | import 'package:flutter_maps_samples/samples/marker_clusters_dynamic.dart'; 26 | import 'package:flutter_maps_samples/samples/marker_custom.dart'; 27 | import 'package:flutter_maps_samples/samples/marker_dynamic.dart'; 28 | import 'package:flutter_maps_samples/samples/my_location.dart'; 29 | import 'package:flutter_maps_samples/samples/polygons.dart'; 30 | import 'package:flutter_maps_samples/samples/polylines.dart'; 31 | import 'package:flutter_maps_samples/samples/scrolling.dart'; 32 | import 'package:flutter_maps_samples/samples/styled_map.dart'; 33 | 34 | void main() { 35 | runApp(const MyApp()); 36 | } 37 | 38 | /// This is just the entry point of the app, including code to list the various 39 | /// samples in a simple UI. 40 | /// 41 | /// The interesting code that has to do with Google Maps 42 | /// is in the `samples/` subdirectory. 43 | class MyApp extends StatelessWidget { 44 | const MyApp({super.key}); 45 | 46 | @override 47 | Widget build(BuildContext context) { 48 | return MaterialApp( 49 | title: 'Google Maps Samples', 50 | theme: ThemeData( 51 | colorScheme: ColorScheme.fromSeed(seedColor: Colors.green), 52 | useMaterial3: true, 53 | ), 54 | home: const MyHomePage(), 55 | ); 56 | } 57 | } 58 | 59 | class MyHomePage extends StatelessWidget { 60 | static final List samples = [ 61 | BasicSample(), 62 | MoveCameraSample(), 63 | AnimateCameraSample(), 64 | MarkerSample(), 65 | CustomMarkerSample(), 66 | DynamicMarkerSample(), 67 | ClustersSample(), 68 | DynamicClustersSample(), 69 | PolygonsSample(), 70 | PolylinesSample(), 71 | MapTypeSample(), 72 | MapIdSample(), 73 | StyledMapSample(), 74 | MyLocationSample(), 75 | HandleEventsSample(), 76 | MapControllerAsyncSample(), 77 | ScrollingSample(), 78 | ]; 79 | 80 | const MyHomePage({super.key}); 81 | 82 | @override 83 | Widget build(BuildContext context) { 84 | return Scaffold( 85 | appBar: AppBar( 86 | backgroundColor: Theme.of(context).colorScheme.inversePrimary, 87 | title: Text('Google Maps Samples'), 88 | ), 89 | body: GridView.extent( 90 | maxCrossAxisExtent: 300, 91 | childAspectRatio: 16 / 9, 92 | padding: const EdgeInsets.all(20), 93 | crossAxisSpacing: 10, 94 | mainAxisSpacing: 10, 95 | children: [ 96 | for (var (index, sample) in samples.indexed) 97 | _buildCard(index, sample, context) 98 | ], 99 | ), 100 | ); 101 | } 102 | 103 | /// Takes one of the widgets from [samples] and builds a tappable 104 | /// card that pushes a new [Route] with the given sample [widget]. 105 | Widget _buildCard(int index, Widget widget, BuildContext context) { 106 | final color = Colors.primaries[index % Colors.primaries.length].shade700; 107 | final title = _describe(widget); 108 | 109 | return Card( 110 | key: Key(title), 111 | color: color, 112 | child: InkWell( 113 | onTap: () { 114 | Navigator.push( 115 | context, 116 | MaterialPageRoute( 117 | builder: (context) => _SharedScaffold( 118 | title: title, 119 | child: widget, 120 | ), 121 | ), 122 | ); 123 | }, 124 | child: Center( 125 | child: Padding( 126 | padding: const EdgeInsets.all(8), 127 | child: Text( 128 | title, 129 | textAlign: TextAlign.center, 130 | style: TextStyle( 131 | color: Colors.white, 132 | fontSize: 20, 133 | fontWeight: FontWeight.bold, 134 | shadows: [Shadow(blurRadius: 10)], 135 | ), 136 | ), 137 | ), 138 | ), 139 | ), 140 | ); 141 | } 142 | 143 | String _describe(Widget widget) { 144 | final camelCaseString = 145 | widget.runtimeType.toString().replaceAll('Sample', ''); 146 | 147 | // Use a RegEx to find uppercase letters preceded by lowercase letters 148 | // or other uppercase letters 149 | return camelCaseString.replaceAllMapped( 150 | RegExp(r'(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])'), 151 | (match) => ' '); 152 | } 153 | } 154 | 155 | /// Code shared between sample pages. 156 | class _SharedScaffold extends StatelessWidget { 157 | final String title; 158 | 159 | final Widget child; 160 | 161 | const _SharedScaffold({required this.title, required this.child}); 162 | 163 | @override 164 | Widget build(BuildContext context) { 165 | return Scaffold( 166 | appBar: AppBar( 167 | backgroundColor: Theme.of(context).colorScheme.inversePrimary, 168 | title: Text(title), 169 | ), 170 | body: child, 171 | ); 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /lib/samples/basic.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'package:flutter/material.dart'; 16 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 17 | 18 | /// This example creates a map using the [GoogleMap] widget. 19 | class BasicSample extends StatelessWidget { 20 | const BasicSample({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return GoogleMap( 25 | // The only required argument is the initial position. 26 | initialCameraPosition: CameraPosition(target: LatLng(0, 0)), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/samples/camera_animate.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'package:flutter/material.dart'; 16 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 17 | 18 | /// The camera zooms in and rotates to show the New York City Hall 19 | /// once the user taps a button. 20 | class AnimateCameraSample extends StatefulWidget { 21 | const AnimateCameraSample({super.key}); 22 | 23 | @override 24 | State createState() => _AnimateCameraSampleState(); 25 | } 26 | 27 | class _AnimateCameraSampleState extends State { 28 | /// An instance of map controller obtained through `onMapCreated`. 29 | GoogleMapController? _controller; 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return Stack( 34 | children: [ 35 | GoogleMap( 36 | initialCameraPosition: CameraPosition(target: LatLng(0, 0)), 37 | onMapCreated: (controller) => _controller = controller, 38 | ), 39 | Align( 40 | alignment: Alignment(0, 0.8), 41 | child: FilledButton( 42 | onPressed: _onPressed, 43 | child: Text('Fly to New York'), 44 | ), 45 | ) 46 | ], 47 | ); 48 | } 49 | 50 | @override 51 | void dispose() { 52 | _controller = null; 53 | super.dispose(); 54 | } 55 | 56 | /// Called when the button is pressed. 57 | void _onPressed() { 58 | // Set up the desired camera update. 59 | final newYork = CameraPosition( 60 | target: LatLng(40.7128, -74.0060), bearing: 270, tilt: 30, zoom: 18); 61 | final update = CameraUpdate.newCameraPosition(newYork); 62 | 63 | // Start the animation. 64 | _controller?.animateCamera(update); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/samples/camera_move.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'package:flutter/material.dart'; 16 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 17 | 18 | /// The camera position is instantly set to a different view 19 | /// once the user taps a button. 20 | class MoveCameraSample extends StatefulWidget { 21 | const MoveCameraSample({super.key}); 22 | 23 | @override 24 | State createState() => _MoveCameraSampleState(); 25 | } 26 | 27 | class _MoveCameraSampleState extends State { 28 | /// An instance of map controller obtained through `onMapCreated`. 29 | GoogleMapController? _controller; 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return Stack( 34 | children: [ 35 | GoogleMap( 36 | initialCameraPosition: CameraPosition(target: LatLng(0, 0)), 37 | onMapCreated: (controller) => _controller = controller, 38 | ), 39 | Align( 40 | alignment: Alignment(0, 0.8), 41 | child: FilledButton( 42 | onPressed: _onPressed, 43 | child: Text('Jump to New York'), 44 | ), 45 | ) 46 | ], 47 | ); 48 | } 49 | 50 | @override 51 | void dispose() { 52 | _controller = null; 53 | super.dispose(); 54 | } 55 | 56 | /// Called when the button is pressed. 57 | void _onPressed() { 58 | // Set up the desired camera update. 59 | final newYork = CameraPosition(target: LatLng(40.7128, -74.0060), zoom: 12); 60 | final update = CameraUpdate.newCameraPosition(newYork); 61 | 62 | // Move the camera. 63 | _controller?.moveCamera(update); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /lib/samples/handle_events.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'package:flutter/material.dart'; 16 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 17 | 18 | /// This example demonstrates how to configure a Google Map 19 | /// with handlers for pointer events. 20 | class HandleEventsSample extends StatefulWidget { 21 | const HandleEventsSample({super.key}); 22 | 23 | @override 24 | State createState() => _HandleEventsSampleState(); 25 | } 26 | 27 | class _HandleEventsSampleState extends State { 28 | String _response = '(Tap on map or a marker.)'; 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | return Stack( 33 | children: [ 34 | GoogleMap( 35 | initialCameraPosition: CameraPosition(target: LatLng(0, 0)), 36 | onTap: (position) => setState(() => _response = 'Tapped $position.'), 37 | markers: { 38 | Marker( 39 | markerId: MarkerId('my_marker'), 40 | position: LatLng(51.5099, -0.1180), 41 | onTap: () => setState(() => _response = 'Tapped marker.'), 42 | ), 43 | }, 44 | ), 45 | Align( 46 | alignment: Alignment(0, 0.8), 47 | child: Card( 48 | child: Padding( 49 | padding: const EdgeInsets.all(16), 50 | child: Text(_response), 51 | ), 52 | ), 53 | ) 54 | ], 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/samples/map_controller_async.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'dart:async'; 16 | 17 | import 'package:flutter/material.dart'; 18 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 19 | 20 | /// This example demonstrates how to synchronize the map 21 | /// with [Future]s and [Stream]s. 22 | class MapControllerAsyncSample extends StatefulWidget { 23 | const MapControllerAsyncSample({super.key}); 24 | 25 | @override 26 | State createState() => 27 | _MapControllerAsyncSampleState(); 28 | } 29 | 30 | class _MapControllerAsyncSampleState extends State { 31 | /// An async completer that we supply with the map controller 32 | /// as soon as the `onMapCreated` callback is fired. 33 | final Completer _completer = Completer(); 34 | 35 | /// A simulated source of asynchronous events. 36 | /// 37 | /// In real apps, this could be a stream of changes to the user's position, 38 | /// for example. 39 | final Stream _myEventsStream = 40 | Stream.periodic(const Duration(seconds: 1)).take(5); 41 | 42 | /// A subscription to [_myEventsStream], so we can properly cancel it. 43 | StreamSubscription? _myStreamSubscription; 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | return GoogleMap( 48 | initialCameraPosition: CameraPosition(target: LatLng(0, 0)), 49 | 50 | // Simply supply the completer with the map controller 51 | // as soon as it is available. 52 | // 53 | // Beware: This will *throw* if the `onMapCreated` callback is fired 54 | // more than once. That could happen, for example, if you change 55 | // the `Key` of the `GoogleMap` widget from one widget build to another, 56 | // and so the old `GoogleMap` widget cannot be reused. 57 | // That scenario is rare but possible. 58 | onMapCreated: (controller) => _completer.complete(controller), 59 | ); 60 | } 61 | 62 | @override 63 | void dispose() { 64 | _myStreamSubscription?.cancel(); 65 | super.dispose(); 66 | } 67 | 68 | @override 69 | void initState() { 70 | super.initState(); 71 | _myStreamSubscription = _myEventsStream.listen(_onOutsideEvent); 72 | } 73 | 74 | void _onOutsideEvent(void _) async { 75 | // First, await the completer's future. This continues immediately 76 | // if the controller value is already available. 77 | final controller = await _completer.future; 78 | 79 | // Bail out if the widget is already disposed. 80 | if (!mounted) return; 81 | 82 | // Use the controller. 83 | controller.animateCamera(CameraUpdate.zoomIn()); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /lib/samples/map_id.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'package:flutter/material.dart'; 16 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 17 | 18 | /// Initializes a map with a mapID to apply Cloud-based maps styling to the map. 19 | class MapIdSample extends StatelessWidget { 20 | const MapIdSample({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return GoogleMap( 25 | initialCameraPosition: CameraPosition(target: LatLng(0, 0)), 26 | 27 | // Generate your own map ID at https://goo.gle/get-map-id. 28 | cloudMapId: '78434bee6dc2e9b1', 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/samples/map_type.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'package:flutter/material.dart'; 16 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 17 | 18 | /// This example demonstrates how to set the satellite, terrain, 19 | /// or hybrid map type property. 20 | class MapTypeSample extends StatelessWidget { 21 | const MapTypeSample({super.key}); 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return GoogleMap( 26 | initialCameraPosition: CameraPosition(target: LatLng(0, 0)), 27 | 28 | // Available map types: 29 | // .normal - Standard road map with streets, political boundaries, labels 30 | // .satellite - Satellite imagery without street labels or overlays 31 | // .terrain - Topographic data showing elevation, vegetation, and so on 32 | // .hybrid - Satellite imagery with road overlays and place labels 33 | mapType: MapType.satellite, 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/samples/marker.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'package:flutter/material.dart'; 16 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 17 | 18 | /// This example identifies a location on the map with a marker. 19 | /// When the user taps the marker, an info window appears. 20 | class MarkerSample extends StatelessWidget { 21 | const MarkerSample({super.key}); 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return GoogleMap( 26 | initialCameraPosition: CameraPosition(target: LatLng(0, 0)), 27 | 28 | // Use this parameter to place markers on the map. 29 | markers: { 30 | Marker( 31 | // The id needs to be locally unique. 32 | markerId: MarkerId('my_nairobi_marker'), 33 | position: LatLng(-1.2898, 36.7747), 34 | infoWindow: InfoWindow(title: 'Nairobi', snippet: 'More info.'), 35 | onTap: () => debugPrint('tapped'), 36 | ), 37 | }, 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/samples/marker_clusters.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'package:flutter/material.dart'; 16 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 17 | 18 | /// Defines a group of nearby markers as a cluster so that the map can 19 | /// collapse them into a single marker when appropriate. 20 | class ClustersSample extends StatelessWidget { 21 | ClustersSample({super.key}); 22 | 23 | final ClusterManager _myCluster = 24 | ClusterManager(clusterManagerId: ClusterManagerId('my cluster')); 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | return GoogleMap( 29 | initialCameraPosition: CameraPosition(target: LatLng(0, 0)), 30 | 31 | // You have to supply the list of clusters that are referred to 32 | // by the map's markers. 33 | // 34 | // Note: For clusters to work on the web, you *must* import an additional 35 | // JavaScript library. Read the web README for info: 36 | // https://pub.dev/packages/google_maps_flutter_web 37 | clusterManagers: {_myCluster}, 38 | markers: { 39 | // Google Maps will smartly cluster markers with the same 40 | // clusterManagerId. When zoomed in close enough, the cluster will 41 | // break up into individual markers. 42 | Marker( 43 | markerId: MarkerId('in 1'), 44 | position: LatLng(6.51, 3.37), 45 | clusterManagerId: _myCluster.clusterManagerId, 46 | ), 47 | Marker( 48 | markerId: MarkerId('in 2'), 49 | position: LatLng(6.64, 3.52), 50 | clusterManagerId: _myCluster.clusterManagerId, 51 | ), 52 | Marker( 53 | markerId: MarkerId('in 3'), 54 | position: LatLng(6.46, 3.58), 55 | clusterManagerId: _myCluster.clusterManagerId, 56 | ), 57 | Marker( 58 | markerId: MarkerId('in 4'), 59 | position: LatLng(6.85, 3.63), 60 | clusterManagerId: _myCluster.clusterManagerId, 61 | ), 62 | 63 | // Markers without a clusterManagerId will always show independently. 64 | Marker( 65 | markerId: MarkerId('out'), 66 | position: LatLng(5.31, -3.99), 67 | ), 68 | }, 69 | ); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /lib/samples/marker_clusters_dynamic.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'package:flutter/material.dart'; 16 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 17 | 18 | /// Demonstrates how to dynamically change the clustering of markers at runtime. 19 | class DynamicClustersSample extends StatefulWidget { 20 | const DynamicClustersSample({super.key}); 21 | 22 | @override 23 | State createState() => _DynamicClustersSampleState(); 24 | } 25 | 26 | class _DynamicClustersSampleState extends State { 27 | Set _clusters = {}; 28 | 29 | Set _markers = { 30 | Marker(markerId: MarkerId('seville'), position: LatLng(37.39, -5.98)), 31 | Marker(markerId: MarkerId('malaga'), position: LatLng(36.71, -4.41)), 32 | Marker(markerId: MarkerId('cadiz'), position: LatLng(36.52, -6.28)), 33 | Marker(markerId: MarkerId('gibraltar'), position: LatLng(36.04, -5.61)), 34 | Marker(markerId: MarkerId('tangier'), position: LatLng(35.76, -5.84)), 35 | Marker(markerId: MarkerId('chefchaouen'), position: LatLng(35.19, -5.25)), 36 | Marker(markerId: MarkerId('tetouan'), position: LatLng(35.58, -5.35)), 37 | Marker(markerId: MarkerId('larache'), position: LatLng(35.19, -6.15)), 38 | }; 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | return GoogleMap( 43 | initialCameraPosition: CameraPosition(target: LatLng(0, 0)), 44 | clusterManagers: _clusters, 45 | markers: _markers, 46 | // We compute clusters as soon as the map has finished loading. 47 | onMapCreated: (_) => _computeClusters(), 48 | ); 49 | } 50 | 51 | /// Creates clusters according to some business logic, then calls [setState]. 52 | void _computeClusters() { 53 | final spainCluster = 54 | ClusterManager(clusterManagerId: ClusterManagerId('spain')); 55 | final moroccoCluster = 56 | ClusterManager(clusterManagerId: ClusterManagerId('morocco')); 57 | 58 | // Here, we simply assign markers above a certain latitude to one cluster, 59 | // and ones below to another. 60 | // 61 | // Real apps will cluster according to some more meaningful relationships 62 | // between markers. 63 | final updatedMarkers = _markers 64 | .map((marker) => marker.copyWith( 65 | clusterManagerIdParam: marker.position.latitude > 35.96 66 | ? spainCluster.clusterManagerId 67 | : moroccoCluster.clusterManagerId, 68 | )) 69 | .toSet(); 70 | 71 | setState(() { 72 | _clusters = {spainCluster, moroccoCluster}; 73 | _markers = updatedMarkers; 74 | }); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /lib/samples/marker_custom.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'package:flutter/material.dart'; 16 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 17 | 18 | /// Shows advanced options of markers. 19 | class CustomMarkerSample extends StatefulWidget { 20 | const CustomMarkerSample({super.key}); 21 | 22 | @override 23 | State createState() => _CustomMarkerSampleState(); 24 | } 25 | 26 | class _CustomMarkerSampleState extends State { 27 | late Marker _marker = Marker( 28 | markerId: MarkerId('my_marker'), 29 | // Start with the default Google Maps pin, except yellow. 30 | // (Note: Hue isn't supported on all platforms.) 31 | icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueYellow), 32 | onTap: _changeIcon, 33 | ); 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | return GoogleMap( 38 | initialCameraPosition: CameraPosition(target: LatLng(0, 0)), 39 | markers: {_marker}, 40 | ); 41 | } 42 | 43 | void _changeIcon() async { 44 | // Set up the image configuration for the new icon, including its size. 45 | final imageConfiguration = 46 | createLocalImageConfiguration(context, size: Size(42, 52)); 47 | 48 | // Load the icon image from an asset. 49 | // Alternatively, you can create the icon with BitmapDescriptor.bytes(), 50 | // which allows loading from network or using a CustomPainter. 51 | final assetIcon = await BitmapDescriptor.asset( 52 | imageConfiguration, 53 | 'assets/icon_flutter.png', 54 | ); 55 | 56 | setState(() { 57 | // Modify the existing marker with the new icon and set its anchor 58 | // to center. 59 | _marker = _marker.copyWith( 60 | iconParam: assetIcon, 61 | anchorParam: const Offset(0.5, 0.5), 62 | ); 63 | }); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /lib/samples/marker_dynamic.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'package:flutter/material.dart'; 16 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 17 | 18 | /// Adds a new marker to the map once the user taps a button. 19 | class DynamicMarkerSample extends StatefulWidget { 20 | const DynamicMarkerSample({super.key}); 21 | 22 | @override 23 | State createState() => _DynamicMarkerSampleState(); 24 | } 25 | 26 | class _DynamicMarkerSampleState extends State { 27 | /// The dynamic set of markers to be shown on the map. 28 | /// Marker IDs need to be unique. 29 | final Set _markers = { 30 | Marker( 31 | markerId: MarkerId('chinatown gate'), 32 | position: LatLng(37.7908, -122.4058), 33 | ), 34 | Marker( 35 | markerId: MarkerId('coit tower'), 36 | position: LatLng(37.8024, -122.4058), 37 | ), 38 | Marker( 39 | markerId: MarkerId('ferry building'), 40 | position: LatLng(37.7955, -122.3937), 41 | ), 42 | }; 43 | 44 | @override 45 | Widget build(BuildContext context) { 46 | return Stack( 47 | children: [ 48 | GoogleMap( 49 | initialCameraPosition: 50 | CameraPosition(target: LatLng(37.7749, -122.4194), zoom: 12.5), 51 | // Simply pass the set of current markers as an argument. 52 | markers: _markers, 53 | ), 54 | Align( 55 | alignment: Alignment(0, 0.8), 56 | child: FilledButton( 57 | onPressed: _onPressed, 58 | child: Text('Add Fisherman’s Wharf'), 59 | ), 60 | ) 61 | ], 62 | ); 63 | } 64 | 65 | void _onPressed() { 66 | const fishermansWharf = Marker( 67 | markerId: MarkerId('fishermansWharf'), 68 | position: LatLng(37.8080, -122.4177), 69 | ); 70 | 71 | // Add the marker with setState. 72 | setState(() => _markers.add(fishermansWharf)); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /lib/samples/my_location.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'dart:async'; 16 | 17 | import 'package:flutter/material.dart'; 18 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 19 | 20 | /// User's location is shown as a blue dot and the My Location button 21 | /// is displayed in the bottom right corner of the map. When the user taps 22 | /// the button, the map pans to the user's current location. 23 | class MyLocationSample extends StatefulWidget { 24 | const MyLocationSample({super.key}); 25 | 26 | @override 27 | State createState() => _MyLocationSampleState(); 28 | } 29 | 30 | class _MyLocationSampleState extends State { 31 | /// To use My Location on some platforms (such as Android), 32 | /// you need to ask the user for permission at runtime. See below. 33 | bool? _permissionGranted; 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | return GoogleMap( 38 | initialCameraPosition: CameraPosition(target: LatLng(37.78, -122.42)), 39 | 40 | // Enables the My Location layer. 41 | // 42 | // This feature is not available on all platforms and you MUST have 43 | // the appropriate location permission enabled in order for this to work. 44 | // See documentation of [GoogleMap.myLocationEnabled] for details. 45 | myLocationEnabled: _permissionGranted ?? false, 46 | 47 | // You can choose whether to show the button that lets the user 48 | // transport the camera to their current location. 49 | // This has no effect when `myLocationEnabled` is false. 50 | myLocationButtonEnabled: true, 51 | ); 52 | } 53 | 54 | @override 55 | void initState() { 56 | super.initState(); 57 | _requestPermission(); 58 | } 59 | 60 | /// A *fake* implementation of requesting the permission. 61 | /// 62 | /// Real apps will use 3rd party packages such as `package:permission_handler` 63 | /// or build their own bespoke solution. 64 | Future _requestPermission() async { 65 | // Wait a bit before continuing. This is required here because we call this 66 | // function from initState(), and that's too soon to be showing dialogues. 67 | await Future.delayed(const Duration(seconds: 1)); 68 | if (!mounted) return; 69 | 70 | var result = await showDialog( 71 | context: context, 72 | builder: (context) => SimpleDialog( 73 | title: Text('Requesting permission'), 74 | children: [ 75 | SimpleDialogOption( 76 | onPressed: () => Navigator.pop(context, true), 77 | child: Text('Grant')), 78 | SimpleDialogOption( 79 | onPressed: () => Navigator.pop(context, false), 80 | child: Text('Deny')), 81 | ], 82 | ), 83 | ); 84 | 85 | if (!mounted) return; 86 | ScaffoldMessenger.of(context).showSnackBar(SnackBar( 87 | content: Text('Fake permission granted: $result. ' 88 | 'Remember that for My Location to actually work, ' 89 | 'you need an actual runtime permission on some platforms. ' 90 | 'See the code of this sample for more info.'), 91 | duration: const Duration(seconds: 10), 92 | showCloseIcon: true, 93 | )); 94 | 95 | setState(() { 96 | _permissionGranted = result; 97 | }); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /lib/samples/polygons.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'package:flutter/material.dart'; 16 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 17 | 18 | /// Displays a map of the Atlantic Ocean with the shape of the famous 19 | /// Bermuda Triangle drawn over it. 20 | class PolygonsSample extends StatelessWidget { 21 | const PolygonsSample({super.key}); 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return GoogleMap( 26 | initialCameraPosition: CameraPosition(target: LatLng(25, -72)), 27 | polygons: { 28 | Polygon( 29 | // Polygon id must be unique. 30 | polygonId: PolygonId('bermuda triangle'), 31 | points: [ 32 | LatLng(25.28, -80.33), 33 | LatLng(32.29, -64.79), 34 | LatLng(18.51, -65.36), 35 | LatLng(25.28, -80.33), // Same as first point to close polygon. 36 | ], 37 | strokeColor: Colors.red, 38 | fillColor: Colors.yellow, 39 | consumeTapEvents: true, 40 | onTap: () => debugPrint('tapped on the Bermuda Triangle'), 41 | ), 42 | }, 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/samples/polylines.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'package:flutter/material.dart'; 16 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 17 | 18 | /// Displays a map of the North Atlantic Ocean with the route of the Titanic 19 | /// marked on it. 20 | class PolylinesSample extends StatelessWidget { 21 | const PolylinesSample({super.key}); 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return GoogleMap( 26 | initialCameraPosition: CameraPosition(target: LatLng(49, -23)), 27 | polylines: { 28 | Polyline( 29 | // Polyline id must be unique. 30 | polylineId: PolylineId('titanic route'), 31 | points: [ 32 | LatLng(50.90, -1.41), // Southampton 33 | LatLng(49.65, -1.60), // Cherbourg 34 | LatLng(49.77, -6.71), 35 | LatLng(51.83, -8.28), // Cobh 36 | LatLng(50.96, -8.58), 37 | LatLng(41.75, -49.90), // Wreck 38 | ], 39 | width: 5, 40 | color: Colors.red, 41 | geodesic: true, 42 | // Custom caps and joint types aren't supported on all platforms. 43 | startCap: Cap.roundCap, 44 | endCap: Cap.roundCap, 45 | jointType: JointType.round, 46 | consumeTapEvents: true, 47 | onTap: () => debugPrint('clicked route'), 48 | ), 49 | }, 50 | ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /lib/samples/scrolling.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'package:flutter/foundation.dart'; 16 | import 'package:flutter/gestures.dart'; 17 | import 'package:flutter/material.dart'; 18 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 19 | 20 | /// This example shows how to maintain proper map interactivity 21 | /// when the map widget is inside a scrollable view. 22 | class ScrollingSample extends StatelessWidget { 23 | const ScrollingSample({super.key}); 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return ListView( 28 | children: [ 29 | _PlaceholderItem(1), 30 | _PlaceholderItem(2), 31 | SizedBox( 32 | height: 300, 33 | child: GoogleMap( 34 | initialCameraPosition: CameraPosition(target: LatLng(0, 0)), 35 | 36 | // To prevent parent widgets from capturing important 37 | // gestures (such as ListView getting all the vertical drags), 38 | // we provide the GoogleMap widget with gesture recognizers. 39 | gestureRecognizers: { 40 | // EagerGestureRecognizer ensures the map receives all gestures, 41 | // taking precedence over other widgets. 42 | Factory(() => EagerGestureRecognizer()), 43 | }, 44 | ), 45 | ), 46 | _PlaceholderItem(3), 47 | _PlaceholderItem(4), 48 | SizedBox( 49 | height: 300, 50 | child: GoogleMap( 51 | initialCameraPosition: CameraPosition(target: LatLng(0, 0)), 52 | 53 | // Here, we leave scrolling gestures to the ListView. 54 | // The map still gets taps (which are not consumed by ListView) 55 | // and also reserves scaling for itself. 56 | gestureRecognizers: { 57 | Factory(() => ScaleGestureRecognizer()), 58 | }, 59 | ), 60 | ), 61 | for (var i = 5; i <= 10; i++) _PlaceholderItem(i), 62 | ], 63 | ); 64 | } 65 | } 66 | 67 | class _PlaceholderItem extends StatelessWidget { 68 | static const List _loremIpsum = [ 69 | 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, ' 70 | 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 71 | 'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris ' 72 | 'nisi ut aliquip ex ea commodo consequat.', 73 | 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum ' 74 | 'dolore eu fugiat nulla pariatur.', 75 | 'Excepteur sint occaecat cupidatat non proident, ' 76 | 'sunt in culpa qui officia deserunt mollit anim id est laborum.', 77 | ]; 78 | 79 | final int value; 80 | 81 | const _PlaceholderItem(this.value); 82 | 83 | @override 84 | Widget build(BuildContext context) { 85 | return Padding( 86 | padding: const EdgeInsets.all(10), 87 | child: Text(_loremIpsum[(value - 1) % _loremIpsum.length]), 88 | ); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /lib/samples/styled_map.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'package:flutter/material.dart'; 16 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 17 | 18 | /// Shows how you can style the map using generated JSON configuration. 19 | class StyledMapSample extends StatelessWidget { 20 | const StyledMapSample({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return GoogleMap( 25 | initialCameraPosition: CameraPosition(target: LatLng(0, 0)), 26 | 27 | // Generate your own JSON at https://mapstyle.withgoogle.com/. 28 | style: r''' 29 | [ 30 | { 31 | "elementType": "geometry", 32 | "stylers": [{"color": "#212121"}] 33 | }, 34 | { 35 | "featureType": "administrative", 36 | "elementType": "geometry", 37 | "stylers": [{"color": "#757575"}] 38 | }, 39 | { 40 | "featureType": "water", 41 | "elementType": "geometry", 42 | "stylers": [{"color": "#000000"}] 43 | } 44 | ] 45 | ''', 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /melos.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # https://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | name: flutter_maps_samples 16 | repository: https://github.com/googlemaps-samples/flutter-maps-samples 17 | 18 | packages: 19 | - . 20 | 21 | command: 22 | version: 23 | # Generate commit links in package changelogs. 24 | linkToCommits: true 25 | # # Only allow versioning to happen on main branch. 26 | # branch: master 27 | # Additionally build a changelog at the root of the workspace. 28 | workspaceChangelog: true 29 | 30 | bootstrap: 31 | # It seems so that running "pub get" in parallel has some issues (like 32 | # https://github.com/dart-lang/pub/issues/3404). Disabling this feature 33 | # makes the CI much more stable. 34 | runPubGetInParallel: false 35 | usePubspecOverrides: true 36 | 37 | scripts: 38 | flutter-analyze: 39 | # We are setting the concurrency to 1 because a higher concurrency can crash 40 | # the analysis server on low performance machines (like GitHub Actions). 41 | run: flutter analyze . --fatal-infos 42 | exec: 43 | concurrency: 1 44 | description: | 45 | Run `flutter analyze` in all packages. 46 | 47 | format: 48 | run: | 49 | dart format . 50 | description: | 51 | Formats the code with dart format. 52 | 53 | test: 54 | run: flutter pub get && flutter test 55 | exec: 56 | concurrency: 1 57 | failFast: true 58 | description: Flutter test 59 | 60 | flutter-build-android: 61 | run: | 62 | flutter pub get && flutter build apk && flutter build appbundle 63 | exec: 64 | concurrency: 1 65 | failFast: true 66 | description: Build the sample app for Android. 67 | 68 | flutter-build-ios: 69 | run: | 70 | flutter pub get && flutter build ios --release --no-codesign 71 | exec: 72 | concurrency: 1 73 | failFast: true 74 | description: Build the sample app for iOS. 75 | 76 | add-license-header: 77 | # If you add here another --ignore flag, add it also to 78 | # "check-license-header". 79 | run: | 80 | addlicense -f header_template.txt \ 81 | --ignore ".idea/**" \ 82 | --ignore "android/app/.cxx/**" \ 83 | --ignore "**/Pods/**" \ 84 | --ignore "**/.dart_tool/**" \ 85 | --ignore "build/**" \ 86 | --ignore "**/GeneratedPluginRegistrant.*" \ 87 | --ignore "**/flutter_export_environment.sh" \ 88 | --ignore "**/FlutterGeneratedPluginSwiftPackage/**" \ 89 | --ignore ".github/PULL_REQUEST_TEMPLATE.md" \ 90 | --ignore ".github/ISSUE_TEMPLATE/**" \ 91 | . 92 | description: Add a license header to all necessary files. 93 | 94 | check-license-header: 95 | # If you add here another --ignore flag, add it also to 96 | # "add-license-header". 97 | run: | 98 | addlicense -f header_template.txt \ 99 | --check \ 100 | --ignore ".idea/**" \ 101 | --ignore "android/app/.cxx/**" \ 102 | --ignore "**/Pods/**" \ 103 | --ignore "**/.dart_tool/**" \ 104 | --ignore "build/**" \ 105 | --ignore "**/GeneratedPluginRegistrant.*" \ 106 | --ignore "**/flutter_export_environment.sh" \ 107 | --ignore "**/FlutterGeneratedPluginSwiftPackage/**" \ 108 | --ignore ".github/PULL_REQUEST_TEMPLATE.md" \ 109 | --ignore ".github/ISSUE_TEMPLATE/**" \ 110 | . 111 | description: Add a license header to all necessary files. 112 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | ansi_styles: 5 | dependency: transitive 6 | description: 7 | name: ansi_styles 8 | sha256: "9c656cc12b3c27b17dd982b2cc5c0cfdfbdabd7bc8f3ae5e8542d9867b47ce8a" 9 | url: "https://pub.dev" 10 | source: hosted 11 | version: "0.3.2+1" 12 | args: 13 | dependency: transitive 14 | description: 15 | name: args 16 | sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 17 | url: "https://pub.dev" 18 | source: hosted 19 | version: "2.6.0" 20 | async: 21 | dependency: transitive 22 | description: 23 | name: async 24 | sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 25 | url: "https://pub.dev" 26 | source: hosted 27 | version: "2.12.0" 28 | boolean_selector: 29 | dependency: transitive 30 | description: 31 | name: boolean_selector 32 | sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" 33 | url: "https://pub.dev" 34 | source: hosted 35 | version: "2.1.2" 36 | characters: 37 | dependency: transitive 38 | description: 39 | name: characters 40 | sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 41 | url: "https://pub.dev" 42 | source: hosted 43 | version: "1.4.0" 44 | charcode: 45 | dependency: transitive 46 | description: 47 | name: charcode 48 | sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a 49 | url: "https://pub.dev" 50 | source: hosted 51 | version: "1.4.0" 52 | checked_yaml: 53 | dependency: transitive 54 | description: 55 | name: checked_yaml 56 | sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff 57 | url: "https://pub.dev" 58 | source: hosted 59 | version: "2.0.3" 60 | cli_launcher: 61 | dependency: transitive 62 | description: 63 | name: cli_launcher 64 | sha256: "5e7e0282b79e8642edd6510ee468ae2976d847a0a29b3916e85f5fa1bfe24005" 65 | url: "https://pub.dev" 66 | source: hosted 67 | version: "0.3.1" 68 | cli_util: 69 | dependency: transitive 70 | description: 71 | name: cli_util 72 | sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c 73 | url: "https://pub.dev" 74 | source: hosted 75 | version: "0.4.2" 76 | clock: 77 | dependency: transitive 78 | description: 79 | name: clock 80 | sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b 81 | url: "https://pub.dev" 82 | source: hosted 83 | version: "1.1.2" 84 | collection: 85 | dependency: transitive 86 | description: 87 | name: collection 88 | sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" 89 | url: "https://pub.dev" 90 | source: hosted 91 | version: "1.19.1" 92 | conventional_commit: 93 | dependency: transitive 94 | description: 95 | name: conventional_commit 96 | sha256: dec15ad1118f029c618651a4359eb9135d8b88f761aa24e4016d061cd45948f2 97 | url: "https://pub.dev" 98 | source: hosted 99 | version: "0.6.0+1" 100 | csslib: 101 | dependency: transitive 102 | description: 103 | name: csslib 104 | sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" 105 | url: "https://pub.dev" 106 | source: hosted 107 | version: "1.0.2" 108 | cupertino_icons: 109 | dependency: "direct main" 110 | description: 111 | name: cupertino_icons 112 | sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 113 | url: "https://pub.dev" 114 | source: hosted 115 | version: "1.0.8" 116 | fake_async: 117 | dependency: transitive 118 | description: 119 | name: fake_async 120 | sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" 121 | url: "https://pub.dev" 122 | source: hosted 123 | version: "1.3.2" 124 | file: 125 | dependency: transitive 126 | description: 127 | name: file 128 | sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 129 | url: "https://pub.dev" 130 | source: hosted 131 | version: "7.0.1" 132 | flutter: 133 | dependency: "direct main" 134 | description: flutter 135 | source: sdk 136 | version: "0.0.0" 137 | flutter_lints: 138 | dependency: "direct dev" 139 | description: 140 | name: flutter_lints 141 | sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" 142 | url: "https://pub.dev" 143 | source: hosted 144 | version: "5.0.0" 145 | flutter_plugin_android_lifecycle: 146 | dependency: transitive 147 | description: 148 | name: flutter_plugin_android_lifecycle 149 | sha256: "5a1e6fb2c0561958d7e4c33574674bda7b77caaca7a33b758876956f2902eea3" 150 | url: "https://pub.dev" 151 | source: hosted 152 | version: "2.0.27" 153 | flutter_test: 154 | dependency: "direct dev" 155 | description: flutter 156 | source: sdk 157 | version: "0.0.0" 158 | flutter_web_plugins: 159 | dependency: transitive 160 | description: flutter 161 | source: sdk 162 | version: "0.0.0" 163 | glob: 164 | dependency: transitive 165 | description: 166 | name: glob 167 | sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de 168 | url: "https://pub.dev" 169 | source: hosted 170 | version: "2.1.3" 171 | google_maps: 172 | dependency: transitive 173 | description: 174 | name: google_maps 175 | sha256: "4d6e199c561ca06792c964fa24b2bac7197bf4b401c2e1d23e345e5f9939f531" 176 | url: "https://pub.dev" 177 | source: hosted 178 | version: "8.1.1" 179 | google_maps_flutter: 180 | dependency: "direct main" 181 | description: 182 | name: google_maps_flutter 183 | sha256: d7e4704e6b9f3452c7cd9eb6efc226e1f9e8273c28da47b0a1e7451916d71005 184 | url: "https://pub.dev" 185 | source: hosted 186 | version: "2.12.2" 187 | google_maps_flutter_android: 188 | dependency: transitive 189 | description: 190 | name: google_maps_flutter_android 191 | sha256: "0ede4ae8326335c0c007c8c7a8c9737449263123385e2bdf49f3e71103b2dc2e" 192 | url: "https://pub.dev" 193 | source: hosted 194 | version: "2.16.0" 195 | google_maps_flutter_ios: 196 | dependency: transitive 197 | description: 198 | name: google_maps_flutter_ios 199 | sha256: "2911e0c5654c2cc0d664324e0f49f055bb748740162821bdc0285045150b0439" 200 | url: "https://pub.dev" 201 | source: hosted 202 | version: "2.15.1" 203 | google_maps_flutter_platform_interface: 204 | dependency: transitive 205 | description: 206 | name: google_maps_flutter_platform_interface 207 | sha256: "970c8f766c02909c7be282dea923c971f83a88adaf07f8871d0aacebc3b07bb2" 208 | url: "https://pub.dev" 209 | source: hosted 210 | version: "2.11.1" 211 | google_maps_flutter_web: 212 | dependency: transitive 213 | description: 214 | name: google_maps_flutter_web 215 | sha256: a45786ea6691cc7cdbe2cf3ce2c2daf4f82a885745666b4a36baada3a4e12897 216 | url: "https://pub.dev" 217 | source: hosted 218 | version: "0.5.12" 219 | graphs: 220 | dependency: transitive 221 | description: 222 | name: graphs 223 | sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" 224 | url: "https://pub.dev" 225 | source: hosted 226 | version: "2.3.2" 227 | html: 228 | dependency: transitive 229 | description: 230 | name: html 231 | sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" 232 | url: "https://pub.dev" 233 | source: hosted 234 | version: "0.15.5" 235 | http: 236 | dependency: transitive 237 | description: 238 | name: http 239 | sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f 240 | url: "https://pub.dev" 241 | source: hosted 242 | version: "1.3.0" 243 | http_parser: 244 | dependency: transitive 245 | description: 246 | name: http_parser 247 | sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" 248 | url: "https://pub.dev" 249 | source: hosted 250 | version: "4.1.2" 251 | intl: 252 | dependency: transitive 253 | description: 254 | name: intl 255 | sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf 256 | url: "https://pub.dev" 257 | source: hosted 258 | version: "0.19.0" 259 | io: 260 | dependency: transitive 261 | description: 262 | name: io 263 | sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b 264 | url: "https://pub.dev" 265 | source: hosted 266 | version: "1.0.5" 267 | json_annotation: 268 | dependency: transitive 269 | description: 270 | name: json_annotation 271 | sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" 272 | url: "https://pub.dev" 273 | source: hosted 274 | version: "4.9.0" 275 | leak_tracker: 276 | dependency: transitive 277 | description: 278 | name: leak_tracker 279 | sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec 280 | url: "https://pub.dev" 281 | source: hosted 282 | version: "10.0.8" 283 | leak_tracker_flutter_testing: 284 | dependency: transitive 285 | description: 286 | name: leak_tracker_flutter_testing 287 | sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 288 | url: "https://pub.dev" 289 | source: hosted 290 | version: "3.0.9" 291 | leak_tracker_testing: 292 | dependency: transitive 293 | description: 294 | name: leak_tracker_testing 295 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" 296 | url: "https://pub.dev" 297 | source: hosted 298 | version: "3.0.1" 299 | lints: 300 | dependency: transitive 301 | description: 302 | name: lints 303 | sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 304 | url: "https://pub.dev" 305 | source: hosted 306 | version: "5.1.1" 307 | matcher: 308 | dependency: transitive 309 | description: 310 | name: matcher 311 | sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 312 | url: "https://pub.dev" 313 | source: hosted 314 | version: "0.12.17" 315 | material_color_utilities: 316 | dependency: transitive 317 | description: 318 | name: material_color_utilities 319 | sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec 320 | url: "https://pub.dev" 321 | source: hosted 322 | version: "0.11.1" 323 | melos: 324 | dependency: "direct dev" 325 | description: 326 | name: melos 327 | sha256: "3f3ab3f902843d1e5a1b1a4dd39a4aca8ba1056f2d32fd8995210fa2843f646f" 328 | url: "https://pub.dev" 329 | source: hosted 330 | version: "6.3.2" 331 | meta: 332 | dependency: transitive 333 | description: 334 | name: meta 335 | sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c 336 | url: "https://pub.dev" 337 | source: hosted 338 | version: "1.16.0" 339 | mustache_template: 340 | dependency: transitive 341 | description: 342 | name: mustache_template 343 | sha256: a46e26f91445bfb0b60519be280555b06792460b27b19e2b19ad5b9740df5d1c 344 | url: "https://pub.dev" 345 | source: hosted 346 | version: "2.0.0" 347 | path: 348 | dependency: transitive 349 | description: 350 | name: path 351 | sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" 352 | url: "https://pub.dev" 353 | source: hosted 354 | version: "1.9.1" 355 | platform: 356 | dependency: transitive 357 | description: 358 | name: platform 359 | sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" 360 | url: "https://pub.dev" 361 | source: hosted 362 | version: "3.1.6" 363 | plugin_platform_interface: 364 | dependency: transitive 365 | description: 366 | name: plugin_platform_interface 367 | sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" 368 | url: "https://pub.dev" 369 | source: hosted 370 | version: "2.1.8" 371 | pool: 372 | dependency: transitive 373 | description: 374 | name: pool 375 | sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" 376 | url: "https://pub.dev" 377 | source: hosted 378 | version: "1.5.1" 379 | process: 380 | dependency: transitive 381 | description: 382 | name: process 383 | sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" 384 | url: "https://pub.dev" 385 | source: hosted 386 | version: "5.0.3" 387 | prompts: 388 | dependency: transitive 389 | description: 390 | name: prompts 391 | sha256: "3773b845e85a849f01e793c4fc18a45d52d7783b4cb6c0569fad19f9d0a774a1" 392 | url: "https://pub.dev" 393 | source: hosted 394 | version: "2.0.0" 395 | pub_semver: 396 | dependency: transitive 397 | description: 398 | name: pub_semver 399 | sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" 400 | url: "https://pub.dev" 401 | source: hosted 402 | version: "2.1.5" 403 | pub_updater: 404 | dependency: transitive 405 | description: 406 | name: pub_updater 407 | sha256: "54e8dc865349059ebe7f163d6acce7c89eb958b8047e6d6e80ce93b13d7c9e60" 408 | url: "https://pub.dev" 409 | source: hosted 410 | version: "0.4.0" 411 | pubspec_parse: 412 | dependency: transitive 413 | description: 414 | name: pubspec_parse 415 | sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" 416 | url: "https://pub.dev" 417 | source: hosted 418 | version: "1.5.0" 419 | sanitize_html: 420 | dependency: transitive 421 | description: 422 | name: sanitize_html 423 | sha256: "12669c4a913688a26555323fb9cec373d8f9fbe091f2d01c40c723b33caa8989" 424 | url: "https://pub.dev" 425 | source: hosted 426 | version: "2.1.0" 427 | sky_engine: 428 | dependency: transitive 429 | description: flutter 430 | source: sdk 431 | version: "0.0.0" 432 | source_span: 433 | dependency: transitive 434 | description: 435 | name: source_span 436 | sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" 437 | url: "https://pub.dev" 438 | source: hosted 439 | version: "1.10.1" 440 | stack_trace: 441 | dependency: transitive 442 | description: 443 | name: stack_trace 444 | sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" 445 | url: "https://pub.dev" 446 | source: hosted 447 | version: "1.12.1" 448 | stream_channel: 449 | dependency: transitive 450 | description: 451 | name: stream_channel 452 | sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" 453 | url: "https://pub.dev" 454 | source: hosted 455 | version: "2.1.4" 456 | stream_transform: 457 | dependency: transitive 458 | description: 459 | name: stream_transform 460 | sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 461 | url: "https://pub.dev" 462 | source: hosted 463 | version: "2.1.1" 464 | string_scanner: 465 | dependency: transitive 466 | description: 467 | name: string_scanner 468 | sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" 469 | url: "https://pub.dev" 470 | source: hosted 471 | version: "1.4.1" 472 | term_glyph: 473 | dependency: transitive 474 | description: 475 | name: term_glyph 476 | sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" 477 | url: "https://pub.dev" 478 | source: hosted 479 | version: "1.2.2" 480 | test_api: 481 | dependency: transitive 482 | description: 483 | name: test_api 484 | sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd 485 | url: "https://pub.dev" 486 | source: hosted 487 | version: "0.7.4" 488 | typed_data: 489 | dependency: transitive 490 | description: 491 | name: typed_data 492 | sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 493 | url: "https://pub.dev" 494 | source: hosted 495 | version: "1.4.0" 496 | vector_math: 497 | dependency: transitive 498 | description: 499 | name: vector_math 500 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" 501 | url: "https://pub.dev" 502 | source: hosted 503 | version: "2.1.4" 504 | vm_service: 505 | dependency: transitive 506 | description: 507 | name: vm_service 508 | sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" 509 | url: "https://pub.dev" 510 | source: hosted 511 | version: "14.3.1" 512 | web: 513 | dependency: transitive 514 | description: 515 | name: web 516 | sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" 517 | url: "https://pub.dev" 518 | source: hosted 519 | version: "1.1.1" 520 | yaml: 521 | dependency: transitive 522 | description: 523 | name: yaml 524 | sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce 525 | url: "https://pub.dev" 526 | source: hosted 527 | version: "3.1.3" 528 | yaml_edit: 529 | dependency: transitive 530 | description: 531 | name: yaml_edit 532 | sha256: fb38626579fb345ad00e674e2af3a5c9b0cc4b9bfb8fd7f7ff322c7c9e62aef5 533 | url: "https://pub.dev" 534 | source: hosted 535 | version: "2.2.2" 536 | sdks: 537 | dart: ">=3.7.0-0 <4.0.0" 538 | flutter: ">=3.27.0" 539 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # https://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | name: flutter_maps_samples 16 | description: "A demo of Google Maps SDK for Flutter." 17 | publish_to: 'none' 18 | 19 | version: 1.0.0+1 20 | 21 | environment: 22 | sdk: ^3.6.0 23 | 24 | dependencies: 25 | flutter: 26 | sdk: flutter 27 | 28 | cupertino_icons: ^1.0.8 29 | google_maps_flutter: ^2.12.2 30 | 31 | dev_dependencies: 32 | flutter_lints: ^5.0.0 33 | flutter_test: 34 | sdk: flutter 35 | melos: ^6.3.2 36 | 37 | flutter: 38 | uses-material-design: true 39 | 40 | assets: 41 | - assets/icon_flutter.png 42 | -------------------------------------------------------------------------------- /screenshots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/screenshots.png -------------------------------------------------------------------------------- /test/smoke_test.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2025 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import 'dart:io'; 16 | 17 | import 'package:flutter/material.dart'; 18 | import 'package:flutter_maps_samples/main.dart'; 19 | import 'package:flutter_test/flutter_test.dart'; 20 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 21 | 22 | /// This test is meant to check that none of the samples are broken at runtime. 23 | /// It will run with `flutter test`, but if you want to see it in action, 24 | /// you can also run: 25 | /// 26 | /// flutter run -d your_device test/smoke_test.dart 27 | void main() { 28 | testWidgets('Smoke test', (WidgetTester tester) async { 29 | final runningOnRealDevice = 30 | !Platform.environment.containsKey('FLUTTER_TEST'); 31 | 32 | // Build our app and trigger a frame. 33 | await tester.pumpWidget(const MyApp()); 34 | 35 | final cardsFinder = find.byType(Card, skipOffstage: false); 36 | expect(cardsFinder, findsNWidgets(MyHomePage.samples.length), 37 | reason: 'not all samples have cards'); 38 | expect(find.byType(GoogleMap), findsNothing, 39 | reason: 'map found on the main menu'); 40 | final cardWidgets = tester.widgetList(cardsFinder); 41 | 42 | for (final cardWidget in cardWidgets) { 43 | final cardFinder = find.byWidget(cardWidget, skipOffstage: false); 44 | 45 | // Scroll up first. 46 | await tester.dragUntilVisible( 47 | cardsFinder.first, find.byType(GridView), Offset(0, 10)); 48 | // Then scroll to the widget. 49 | await tester.dragUntilVisible( 50 | cardFinder, find.byType(GridView), Offset(0, -10)); 51 | 52 | // Running the following steps in "true" async 53 | // so that method channels have a chance to work. 54 | await tester.runAsync(() async { 55 | // Tap the card to open the sample. 56 | await tester.tap(cardFinder); 57 | await tester.pumpAndSettle(); 58 | 59 | // Expect to find a GoogleMap widget. Some samples have more than one. 60 | expect(find.byType(GoogleMap), findsAny); 61 | 62 | // Get back. 63 | await tester.pageBack(); 64 | await tester.pumpAndSettle(); 65 | 66 | if (runningOnRealDevice) { 67 | // Give GoogleMap a tiny amount of time to avoid FocusManager 68 | // being used after disposal. 69 | await Future.delayed(const Duration(milliseconds: 50)); 70 | } 71 | }); 72 | } 73 | }); 74 | } 75 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlemaps-samples/flutter-maps-samples/69aa277eb253232d4e2d735b803edc43a4afdba8/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | flutter_maps_samples 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flutter_maps_samples", 3 | "short_name": "flutter_maps_samples", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | --------------------------------------------------------------------------------