The CarDoctor sdk sos is a Flutter package to integrate location-based garage finder for mobile device.

Getting started

Environment: flutter: ">=3.0.0" sdk: '>=2.12.0 <3.0.0'

Import package into pubspec.yaml

dependencies:
  cardoctor_sdk_sos: ^1.0.3

Usage

Android On Android you'll need to add permission to your AndroidManifest.xml.

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

iOS On iOS you'll need to add the following entries to your Info.plist file

	<key>VTMapAccessToken</key>
	<string>VTMap access token</string>
	<key>NSLocationWhenInUseUsageDescription</key>
	<string>App [App name] needs to access location permission to find nearby garage</string>
	
	Add this to your info.plist under dict
	<key>LSApplicationQueriesSchemes</key>
    <array>
      <string>tel</string>
    </array>

Add following lines to ios/Podfile

platform :ios, '10.0'
source "https://github.com/vtmaps/pod_control.git"
source "https://github.com/CocoaPods/Specs.git"

Note: To run app on iOS simulator, please open xcode, select Pods project and add "arm64" to Excluded Architectures for target iOS Simulator for all ViettelMap library

Usage:

  Future onClickButton(BuildContext context) async {
    final option = CarDoctorOption(
      bearerToken: 'TOKEN',
      apiUrl: 'API_URL',
      imageUrl: 'IMAGE_URL',
      mapKey: 'MAP_KEY',
    );
    final sdkSos = CarDoctorSdkSos(option);
    sdkSos.open(context);
  }

Additional information