mapsted_flutter 0.0.1 copy "mapsted_flutter: ^0.0.1" to clipboard
mapsted_flutter: ^0.0.1 copied to clipboard

A Flutter plugin for integrating Mapsted's advanced location and mapping technology, offering easy access to precise indoor and outdoor navigation features.

Usage #

First, add mapsted_flutter as a dependency in your pubspec.yaml file.

dependencies:
  mapsted_flutter: ^0.0.1

Don't forget to flutter pub get.

Setting the mapsted plugin config #

Run below command in your project directory in terminal

dart run mapsted_flutter:create

Platform Specific Configurations #

iOS #

  • Project/ios/Podfile Add source file on top.
source 'https://cdn.cocoapods.org/'

# To run in simulator add below source target
source 'https://github.com/Mapsted/podspec-simulator.git'

# To run in device add below source target
source 'https://github.com/Mapsted/podspec.git'
  • Project/ios/Podfile set use frameworks in your app target
use_frameworks!

IMPORTANT

  • Add license file in Resources folder your_ios_license.key

Android #

  1. Set the minSdkVersion in android/app/build.gradle:
android {
    defaultConfig {
        minSdkVersion 24
    }
}

2. Create build-extras.gradle File
Create a file named build-extras.gradle in the android/app directory of your project.

android {
    packagingOptions {
                        exclude 'META-INF/LICENSE.md'
                        exclude 'META-INF/NOTICE.md'
                        exclude 'META-INF/gradle/incremental.annotation.processors'
                    }
    dataBinding {
        enabled = true
    }
}
  1. Apply the build-extras.gradle in app/build.gradle

Open your android/app/build.gradle file and add the following code to apply the build-extras.gradle file if it exists:

def hasBuildExtras1 = file('build-extras.gradle').exists()
if (hasBuildExtras1) {
    apply from: 'build-extras.gradle'
}
  1. Set the buildscript Repositories

Update the buildscript section in android/app/build.gradle to include additional repositories:

buildscript {
    repositories {
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }
        maven { url "https://mobilesdk.mapsted.com:8443/artifactory/gradle-mapsted" }
    }
}

Make sure to save your changes and sync your project with Gradle to apply these configurations.

IMPORTANT

  • Add license file in Assets folder('/app/src/main/assets') your_android_license.key

Example #

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  MyHomePageState createState() => MyHomePageState();
}

class MyHomePageState extends State<MyHomePage> {
  final MapstedFlutter mapsted = MapstedFlutter();

  Future<void> launchMapActivity() async {
    try {
      await mapsted.launchMapActivity();
    } catch (e) {
      print('Error launching map activity: $e');
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Mapsted Plugin Demo'),
      ),
      body: Center(
        child: ElevatedButton(
          onPressed: launchMapActivity,
          child: const Text("Launch Map"),
        ),
      ),
    );
  }
}

See example.dart linked example for more info.

0
likes
0
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for integrating Mapsted's advanced location and mapping technology, offering easy access to precise indoor and outdoor navigation features.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

args, flutter, plist_parser, plugin_platform_interface, xml, yaml

More

Packages that depend on mapsted_flutter

Packages that implement mapsted_flutter