Skip to content

SDKs · Flutter

Step 1 — Install & set up

Install the package, get a key, and configure Android and iOS.

1. Install

Terminal
flutter pub add ubhub_maps:^0.8.1
One import
import 'package:ubhub_maps/ubhub_maps.dart';

Requires Flutter 3.29+ and Dart 3.7+. The native map runs on Android and iOS.

2. Get an API key

Create a key in your dashboard (allow basemap, geocode, route) and pass it at build time:

Run with the key
flutter run --dart-define=UBHUB_API_KEY=YOUR_RESTRICTED_KEY

Mobile keys are extractable

A key shipped in an app is not a secret. Use a separate restricted key with endpoint restrictions, quotas and rate limits.

3. Platform setup

PlatformNative map setup
AndroidCompile SDK 36 and Java 21 with a compatible Flutter toolchain. The plugin declares INTERNET permission.
iOSiOS 13 or newer. Use CocoaPods; no Swift Package Manager integration in this version.