Get Started With Sample Apps
Prerequisites
Before running the example applications, ensure you have an IDE for development such as Android Studio or Visual Studio Code installed on your machine.
Then set up your IDE for Flutter development by following the official setup guides for Visual Studio Code and Android Studio.
After setup is complete, verify that Flutter is correctly installed by running the following command in your terminal:
flutter doctor
It should display a summary of installed tooling and report any issues found. Make sure there are no errors related to Flutter, Dart, or your IDE.
If running the command results in the command not found: flutter error, ensure that Flutter is correctly installed and added to your system's PATH so your terminal can access it. You can verify the installation by running flutter --version in your terminal.
Downloading the examples
Example applications for the Maps SDK for Flutter are available on Github. You can clone the repository or download project ZIP file by clicking the blue Code button and selecting Download ZIP.

If you chose to download the ZIP file, make sure to extract it after the download is complete.
Running the examples
Create and use an API key
Authentication is recommended to use the Maps SDK for Flutter without the watermark and ensure full functionality. This guide provides detailed instructions on how to obtain and set up your API key. Some features do not work unless a valid token is set and the number of allowed requests is limited.
Once you have your API key, you need to set it in the example project. Open the lib/main.dart file and locate the following line:
const projectApiToken = String.fromEnvironment('YOUR_API_TOKEN_HERE');
And replace the String.fromEnvironment('YOUR_API_TOKEN_HERE') with your actual API key, keeping the quotes. For example:
const projectApiToken = 'eyJhbGciOi...';
You can also set the API key as an environment variable named YOUR_API_TOKEN_HERE in your IDE or terminal, which allows you to keep your API key secure and avoid hardcoding it in the source code.
Make sure the token is not commited or shared publicly. If the token is exposed, please deactivate it and generate a new one.