pinpoint_sdk 12.2.0-sigma  pinpoint_sdk: ^12.2.0-sigma copied to clipboard
pinpoint_sdk: ^12.2.0-sigma copied to clipboard
The Pinpoint SDK is a cross-platform (Android/iOS) Flutter plugin for positioning with Pinpoint's technology.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:pinpoint_sdk/pinpoint_sdk.dart';
import 'geolocator_widgets.dart';
void main() {
  // initialize Geolocator
  // Note: the API key will become mandatory in a future release, at the moment it is still optional.
  initGeolocator(apiKey: 'MyApiKey');
  // You need to call the function Geolocator.updateGeoreference in your app to enable positioning.
  // Check the Readme (section #Usage) for more details.
  hierarchicalLoggingEnabled = true;
  // listen only to logs by Pinpoint SDK
  Logger('pinpoint_sdk').onRecord.listen(
    (record) {
      print('${record.time} [${record.loggerName}] ${record.message}');
    },
  );
  runApp(const GeolocatorApp());
}