SDKs · Flutter
Step 1 — Install & set up
Install the package, get a key, and configure Android and iOS.
1. Install
flutter pub add ubhub_maps:^0.8.1import '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:
flutter run --dart-define=UBHUB_API_KEY=YOUR_RESTRICTED_KEYMobile 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
| Platform | Native map setup |
|---|---|
| Android | Compile SDK 36 and Java 21 with a compatible Flutter toolchain. The plugin declares INTERNET permission. |
| iOS | iOS 13 or newer. Use CocoaPods; no Swift Package Manager integration in this version. |