Mappy 2.0, 16 months later

Related tags

Templates Mappy2
Overview

Mappy 2

Remake and slight overhaul of the Mappy app, 16 months later, which was developed to showcase the integration of Mapbox in Flutter. Currently, it's only available for Android, as I'm waiting for my new MacBook Pro to arrive 🤦 . I will update the project in the future, I promise.

Usage

This documentation will explain the necessary steps to get the application up and running on respective platforms, Android and iOS (coming soon). In both cases, you need to gather appropriate credentials, these are the public and private (or secret) tokens.

  1. Secret token needs to have Downloads:Read scope
  2. Public token is usually the default public token, or a newly generated token marked as public

Android

Create a gradle.properties file in Gradle user home folder (typically USER_HOME/.gradle) with the following contents:

MAPBOX_DOWNLOADS_TOKEN=YOUR_SECRET_MAPBOX_ACCESS_TOKEN

Next, copy the public token somewhere accessible, for example, in android/app/src/main/res/values/strings.xml (this file is mentioned in android/.gitignore for this particular reason)

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="mapbox_access_token">YOUR_MAPBOX_ACCESS_TOKEN</string>
</resources>

Obviously you don't need to do it this way, but just find a way to keep the public (access) token somewhere handy.

Running the app

Start by installing dependencies and running the code generation task

flutter pub get
flutter pub run build_runner build

To run the app, provide the public access token via --dart-define

flutter run --dart-define=ACCESS_TOKEN=<public-access-token>

You can use the trivial unit test to check if points of interest are fetched correctly from Mapbox's Search API

flutter test --dart-define=ACCESS_TOKEN=<public-access-token>
You might also like...

🛒 A simple Shop App to browse, add your own products, add products to cart and later order them.

🛒 A simple Shop App to browse, add your own products, add products to cart and later order them.

Jun 8, 2022
Owner
Peter Aleksander Bizjak
Mobile & full-stack developer
Peter Aleksander Bizjak
count your age by years, months,days,hours and min by flutter

countage A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Hmdo 2 Sep 6, 2022
Weibo@Flow - A third party Weibo client for Android with Material You theming (iOS version later). 💪 Powered by Flutter 💪

Weibo@Flow - A third party Weibo client for Android with Material You theming (iOS version later). ?? Powered by Flutter ??

妇校长 6 Sep 19, 2022
Age2 - A Flutter package to calculate someone's age in days, months, and years

age A Flutter package to calculate someone's age in days, months, and years; in

Charles Dyason 0 Feb 6, 2022
count your age by years, months,days,hours and min by flutter

countage A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Hmdo 2 Sep 6, 2022
Megaflixz is a movie app for the movie lover in you. Includes all new and upcoming movies and TV series. Also has an option to save movies to watch later list

MegaflixZ MegaflixZ is a movie app for the movie lover in you. It is an app that displays new and upcoming movies and tv series. Team members Deepak M

Deepak Mathews Koshy 11 Aug 23, 2021
Beautiful, minimal, and fast weather app. (Requires Android 6.0 or later)

Beautiful, minimal, and fast weather app. (Requires Android 6.0 or later)

Lacerté 104 Dec 20, 2022
Console - Print.color() to console in any platform, more features will be added later.

palestine_console Part of PalestineDevelopers Print.color() to console in any platform, more features will be added later. Table Of Contents Features

Palestine Developers 2 Jan 13, 2022
Weibo@Flow - A third party Weibo client for Android with Material You theming (iOS version later). 💪 Powered by Flutter 💪

Weibo@Flow - A third party Weibo client for Android with Material You theming (iOS version later). ?? Powered by Flutter ??

妇校长 6 Sep 19, 2022