neshanmap_flutter

A Flutter plugin that shows a Neshan map view with a simple style option.


⚠️ Note:

  • This plugin is not affiliated with or endorsed by Neshan.
  • You must obtain your own valid Neshan license to use their SDKs in production.
  • This package only provides the Flutter integration layer; all rights to the Neshan SDK

Install

Add to your pubspec.yaml:

dependencies:
  neshanmap_flutter: ^latest_version

Android setup
  1. Add Neshan Maven repository to android/build.gradle.kts (top‑level):
pluginManagement {
    repositories {
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven(url = uri("https://maven.neshan.org/artifactory/public-maven"))
    }
}
  1. Add Neshan SDK dependencies to your app android/app/build.gradle.kts:
dependencies {
    // Neshan Android SDKs
    implementation("neshan-android-sdk:mobile-sdk:1.0.3@aar")
    implementation("neshan-android-sdk:services-sdk:1.0.0@aar")
    implementation("neshan-android-sdk:common-sdk:0.0.3@aar")

    // Google Play Services / AndroidX (align with your project)
    implementation("com.google.android.gms:play-services-location:21.3.0")
    implementation("androidx.appcompat:appcompat:1.7.1")
    implementation("androidx.constraintlayout:constraintlayout:2.2.1")
    implementation("com.google.android.gms:play-services-gcm:17.0.0")
    implementation("com.google.android.material:material:1.12.0")
}
  1. Add required permissions in android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  1. Place your Neshan license file neshan.license into:
android/app/src/main/res/raw

Create the raw directory if it does not exist.

  1. Build and run your Flutter app on Android.

iOS setup
  1. In the example app (or your consuming app) update ios/Podfile:
platform :ios, '13.0'

target 'Runner' do
  use_frameworks!
  pod 'NeshanMobileSDK', '~> 0.9.5'

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
      # Optional for Apple Silicon simulators if binary pods miss arm64
      config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
      if target.name == 'neshanmap_flutter'
        config.build_settings['CLANG_ENABLE_MODULES'] = 'YES'
        config.build_settings['OTHER_LDFLAGS'] = '$(inherited) -ObjC'
        config.build_settings['HEADER_SEARCH_PATHS'] = '$(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/NeshanMobileSDK"'
        config.build_settings['FRAMEWORK_SEARCH_PATHS'] = '$(inherited) "${PODS_ROOT}/NeshanMobileSDK"'
      end
    end
  end
end
  1. Install pods:
cd ios && pod install
  1. Place your Neshan license file neshan.license into:
ios/Runner
  1. Open Runner.xcworkspace in Xcode and build.

If you see “Module 'NeshanMobileSDK' not found”, clean Pods/DerivedData and reinstall:

cd ios
rm -rf Pods Podfile.lock
pod repo update
pod install
rm -rf ~/Library/Developer/Xcode/DerivedData
open Runner.xcworkspace

Docs:


License (required)

You must obtain your own Neshan license from the Neshan panel and include it in your app as neshan.license.

  • Android: place the file at android/app/src/main/res/raw/neshan.license (create the raw folder if it doesn't exist)
  • iOS: place the file at ios/Runner/neshan.license

Docs:


Screenshots

Android iOS


Flutter usage

import 'package:neshanmap_flutter/neshanmap_flutter.dart';


class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      themeMode: ThemeMode.light,
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        backgroundColor: Colors.white,
        appBar: AppBar(title: const Text('نقشه نشان فلاتر')),
        body: NeshanMapFlutter(useHybridComposition: true), // style: 'standardDay' | 'standardNight' | 'neshan'
      ),
    );
  }
}

License

Copyright (c) 2025, Navid Shokoufeh
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
   this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
   contributors may be used to endorse or promote products derived from
   this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Libraries

neshanmap_flutter