Skip to main content

Flutter Native - Getting started


Before starting to develop your application with the WemapSDKs, you'll need to configure your credentials and add the SDK as a dependency.

Configure credentials

Wemap provides WemapSDKs via a private host and you will need to get secret, access keys and region to be able to access it. For additional information contact Wemap team.

Once you get the credentials, specify AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_REGION in your environment

export AWS_ACCESS_KEY_ID=...
export AWS_REGION=...

then you will send us your flutter team email, so you get permissions to use the SDK

Add the dependency

firstly login with the same email you have provided us:

dart pub global activate onepub
onepub login

Add the WemapSDKs to your app by adding in pubspec.yaml file:

version: 0.3.0

Or by cmd:

onepub pub add wemap_sdk_flutter
  • And then you can bootstrap dependencies using:
flutter pub get


  • Add this two repositories to repositories block inside allprojects in android/build.gradle:
maven { url "" }
maven {
url "s3://"
credentials(AwsCredentials) {
accessKey String.valueOf(System.getenv("AWS_ACCESS_KEY_ID"))
secretKey String.valueOf(System.getenv("AWS_SECRET_ACCESS_KEY"))
  • Add the minSdkVersion to
  • In your app/build.gradle set the minSdkVersion inside defaultConfig section to:
minSdkVersion localProperties.getProperty('flutter.minSdkVersion').toInteger()
  • If you want use VPS to access user location, you have to add into AndroidManifest.xml:
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />


  • Add to Podfile head:
source ''
source ''
  • (also in Podfile) Set BUILD_LIBRARY_FOR_DISTRIBUTION to true:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
  • If you want use VPS to access user location, you have to add into Info.plist:

and this into Podfile since permission_handler package is used :

config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [

## dart:

## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]

Add a map

  • You can simply add the Livemap widget as follow:
import 'package:flutter/material.dart';
import 'package:wemap_sdk_flutter/wemap_sdk_flutter.dart';

void main() {
runApp(const MyHomePage(
title: 'wemap sample',

class MyHomePage extends StatelessWidget {
final String title;

const MyHomePage({super.key, required this.title});

void _onMapReady(MapData mapData, MapManager livemapManager) {
// what ever to do, the map is ready

void _onBuildingFocusChanged(Building? building) {
// print("on Building focus changed");

void _onActiveLevelChanged(Building building, Level level) {
// print("on active level changed");

Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text(title)),
body: Container(
constraints: const BoxConstraints.expand(),
child: WemapMap(
options: MapOptions(
mapID: 25669, token: "", environment: Environment.PROD),
onMapReady: _onMapReady,
onActiveLevelChanged: _onActiveLevelChanged,
onBuildingFocusChanged: _onBuildingFocusChanged,


for offline mode, you have to create a folder in project root with the name assets, and add the offline zip file inside it. then confirm it in pubspec.yaml by:

- assets/

now you can enable the offline property within MapOptions, and specify the zip File Name (with extension):

mapID: xxx,
token: xxx,
offlineMode: true,
offlineZipFileName: ""