Radar Flutter Plugin

Radar is location data infrastructure. You can use Radar SDKs and APIs to add location context to your apps with just a few lines of code.


See the Radar overview documentation here.


This is a community developed plugin.

Flutter support:

  • x iOS
  • x Android


  • User management
  • Geofencing
  • Geo APIs (geocoding, distance, autocomplete)
  • Search (geofences, points and places)
  • Location tracking and context (foreground and background)
  • Trip tracking

Planned features

  • Trip Tracking and geofence search metadata
  • Mock tracking
  • Accept/reject events



Change the minSdkVersion for Android

radar_flutter_plugin is compatible only from version 16 of Android SDK so you should change this in android/app/build.gradle if needed:

Android {
  defaultConfig {
     minSdkVersion: 16

Add permissions for Location

We need to add the permission to request location:

In the android/app/src/main/AndroidManifest.xml let’s add:

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

add Radar SDK module to the app build.gradle file:

dependencies {
    implementation 'io.radar:sdk:3.0.9'

Add MainApplication

Open the MainApplication class for your project. Note: MainApplication is not created by default through flutter create <Project>, so you may need to create it.

Add code to extend the Flutter Application class (FlutterApplication) that imports and initializes Reader SDK:


import io.flutter.app.FlutterApplication;
import io.flutter.view.FlutterMain;
import io.radar.sdk.Radar;

public class MainApplication extends FlutterApplication {
    public void onCreate() {

If you create MainApplication class in above step, update AndroidManifest.xml in your project:

  <!-- use custom "MainApplication" class instead of "io.flutter.app.FlutterApplication" -->
  ... />

In MainActivity you might need the following engine registration:

public class MainActivity extends FlutterActivity {
    public void configureFlutterEngine(FlutterEngine flutterEngine) {


Add permissions for Location

In the ios/Runner/Info.plist let’s add the following replacing the usage description strings content as appropriate:

  <string>Your iOS 11 and higher background location usage description goes here. e.g., "This app uses your location in the background to recommend places nearby."</string>
  <string>Your iOS 10 and lower background location usage description goes here. e.g., "This app uses your location in the background to recommend places nearby."</string>
  <string>Your foreground location usage description goes here. e.g., "This app uses your location in the foreground to recommend places nearby."</string>

For location permissions on iOS see more at: https://developer.apple.com/documentation/corelocation/requesting_authorization_for_location_services

Change the target for iOS

The Radar SDK supports iOS 10 and higher. You might need to adjust the following if not already done:

  1. Adjust the MinimumOSVersion in ios/Flutter/Flutter.framework/AppFrameworkInfo.plist:
  1. Adjust your Podfile to define a global platform (platform :ios, '10.0') and comment out use frameworks (# use_frameworks!) if needed.

Initialize Radar

objective-c example:

#import <RadarSDK/RadarSDK.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [Radar initializeWithPublishableKey:@"yourRadarPublishableKey"];
  [GeneratedPluginRegistrant registerWithRegistry:self];
  // Override point for customization after application launch.
  return [super application:application didFinishLaunchingWithOptions:launchOptions];


swift example:

import RadarSDK

@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    Radar.initialize(publishableKey: "<yourRadarPublishableKey>")
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)


To use this plugin, add radar_flutter_plugin as a dependency in your pubspec.yaml file. For example:

  radar_flutter_plugin: ^0.0.1

See here for example applications of Radar and the example app for relevant functions.