Skip to content
Developers Docs

Flutter getting started

This guide takes you through integrating the Mapsted Flutter plugin (mapsted_flutter) against the native Mapsted SDK 26.7.1.

Breaking change from the 6.x / pub 0.0.x plugin

The 26.7.1 plugin is built on the 26.7.1 native SDK, which raises the minimum toolchain (below). These are breaking for apps that were on the old plugin — treat this as a major upgrade, not a drop-in bump. See the Flutter migration guide for the complete, step-by-step upgrade.

1. Install the plugin

The plugin is distributed as a git dependency by tag (v26.7.1) from the official MapstedHQ GitHub organization. In your pubspec.yaml:

dependencies:
  mapsted_flutter:
    git:
      url: https://github.com/MapstedHQ/mapsted-flutter.git
      ref: v26.7.1

Then run flutter pub get. The plugin version tracks the native SDK exactly: plugin 26.7.1 wraps native SDK 26.7.1. Use of the SDK requires a valid Mapsted commercial licence (see the bundled LICENSE).

2. Consumer toolchain — minimum versions

Platform Minimum
Flutter 3.29+ (certified on a current stable channel)
Android minSdkVersion 26; Kotlin 2.3.20; the plugin's build hooks inject the SDK's required manifestPlaceholders
iOS deployment target 16.0; CocoaPods

3. Android setup

1. Set minSdkVersion 26 in android/app/build.gradle(.kts) — the SDK's map UI requires API 26.

2. The plugin pulls the SDK from the GitHub-Pages Maven repo (https://mapstedhq.github.io/mapsted-android-maven) — no Artifactory or JitPack for the Mapsted artifacts.

3. manifestPlaceholders. The 26.7.1 Android artifacts require two manifest placeholders during the merge. The plugin's scaffolder injects them for you and supports both the Groovy build.gradle and the modern Kotlin-DSL build.gradle.kts that recent flutter create projects emit — so a fresh Flutter app builds without manual manifest edits.

4. Add your licence file to the Android assets folder: android/app/src/main/assets/your_android_license.key.

4. iOS setup

Your app must use CocoaPods. In your ios/Podfile:

1. Add the Mapsted podspec sources (the 26.7.1 pods live in the MapstedHQ spec repo):

source 'https://cdn.cocoapods.org/'
source 'https://github.com/MapstedHQ/podspec.git'

2. Set the platform to 16.0:

platform :ios, '16.0'

3. Run pod install (or pod update).

4. Add your licence file to Copy Bundle Resources: your_ios_license.key.

5. Add the required Info.plist usage-description keys (iOS terminates the app on location access without them): NSLocationWhenInUseUsageDescription, NSLocationAlwaysAndWhenInUseUsageDescription, NSBluetoothAlwaysUsageDescription, NSMotionUsageDescription.

Licence is bound to your bundle id

Mapsted licences are issued for a specific OS and bundle id. An Android licence will not load on iOS — use the .key issued for your iOS bundle id (or the bundle-agnostic demo key for demo properties).

5. Usage

Add the embedded map widget, or launch the fullscreen map:

import 'package:mapsted_flutter/mapsted_flutter.dart';

// Embedded indoor map for a property:
MapstedMapView(
  propertyId: 504,
  onMapReady: () {},
);

// Fullscreen property picker → indoor map:
await MapstedFlutter.launchMapActivity();

Use the embedded MapstedMapView for production surfaces

The embedded MapstedMapView is the recommended, certified integration path for production surfaces — validated on real arm64 hardware on both platforms. The fullscreen launchMapActivity() opens the native SDK's own full-screen map screen and is well suited to quick previews.

6. Indoor map loading (SDK 26.7.1)

Physical devices are fully supported. The indoor floorplan, auto-plot, and navigation render correctly on real arm64 hardware on both platforms, including the first launch after install.

A complete, working reference is the sample app — MapstedHQ/MapstedSampleFlutter. The plugin is certified at 26.7.1 with the indoor map rendering on real Android (arm64) and real iPhone hardware.