1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00
Files
samples/flutter_maps_firestore
dependabot[bot] 711076f46f Bump location from 4.4.0 to 5.0.0 in /flutter_maps_firestore (#1941)
Bumps [location](https://github.com/Lyokone/flutterlocation) from 4.4.0
to 5.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Lyokone/flutterlocation/releases">location's
releases</a>.</em></p>
<blockquote>
<h2>location-v5.0.0</h2>
<p><a href="https://pub.dev/packages/location/changelog#500">See
changelog on pub.dev</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b622829537"><code>b622829</code></a>
Merge pull request <a
href="https://redirect.github.com/Lyokone/flutterlocation/issues/850">#850</a>
from bartekpacia/fix_location_web_constraint</li>
<li><a
href="f168621db1"><code>f168621</code></a>
location: fix constraint on location_web</li>
<li><a
href="dacf177751"><code>dacf177</code></a>
Merge pull request <a
href="https://redirect.github.com/Lyokone/flutterlocation/issues/849">#849</a>
from bartekpacia/better_melos</li>
<li><a
href="48231e114c"><code>48231e1</code></a>
bump dependency on location_platform_interface</li>
<li><a
href="f8bdb20226"><code>f8bdb20</code></a>
improve melos scripts</li>
<li><a
href="d63c2640b8"><code>d63c264</code></a>
Merge pull request <a
href="https://redirect.github.com/Lyokone/flutterlocation/issues/848">#848</a>
from bartekpacia/release_new_versions</li>
<li><a
href="8d49e58cff"><code>8d49e58</code></a>
bump versions</li>
<li><a
href="51efa65611"><code>51efa65</code></a>
foramt changelogs</li>
<li><a
href="5165086595"><code>5165086</code></a>
Merge pull request <a
href="https://redirect.github.com/Lyokone/flutterlocation/issues/847">#847</a>
from bartekpacia/revive</li>
<li><a
href="5358fabfac"><code>5358fab</code></a>
add GitHub Actions workflows for publishing</li>
<li>Additional commits viewable in <a
href="https://github.com/Lyokone/flutterlocation/compare/location-v4.4.0...location-v5.0.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=location&package-manager=pub&previous-version=4.4.0&new-version=5.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-12 21:11:28 +10:00
..
2023-05-11 06:16:31 +10:00
2023-01-25 09:08:51 +10:00

Flutter Maps Firestore

A Flutter sample app that shows the end product of the Cloud Next '19 talk Build Mobile Apps With Flutter and Google Maps. The live coding starts at about 17:40.

Goals for this sample

  • Showcase how to build an app that uses Google Maps with Flutter:
    • Loading a list of Ice Cream shops from Cloud Firestore
    • Listing the shops in a custom carousel
    • Showing the shop locations on a map using Markers
    • Controlling the Google Map from the carousel

The important bits

Cloud Firestore

To set up Cloud Firestore connectivity, follow the steps outlined in the Cloud Firestore package setup section.

Next, you need to populate your Cloud Firestore with a collection named ice_cream_stores, structured a bit like this:

ice_cream_stores:
  ChIJ70taCKKAhYAR5IMmYwQT4Ts:
    placeId: ChIJ70taCKKAhYAR5IMmYwQT4Ts
    address: 432 Octavia St #1a, San Francisco, CA 94102, USA
    location: 37.7763629, -122.4241918
    name: Smitten Ice Cream

The collection name is referenced from _HomePageState's initState method. The placeId, address, location and name are used at various points in the widget tree to render appropriate data.

Google Maps

You need to add a Google Maps SDK for iOS API key to ios/Runner/AppDelegate.m. This enables the Google Map to render. You will also need to add a Google Maps Web Services API key to lib/api_key.dart.

To reiterate the warning that we gave during the talk, do not put Web Service API keys in your production binary. You need to build a proxy service to serve pre-authenticated content to your mobile applications so you can change API keys as required. We only did this to make it easy to demonstrate on stage.

Questions/issues

If you have a general question about building with Google Maps in Flutter, the best places to go are:

If you run into an issue with the sample itself, please file an issue in the main Flutter repo.