tracelet 0.2.5 copy "tracelet: ^0.2.5" to clipboard
tracelet: ^0.2.5 copied to clipboard

Production-grade background geolocation for Flutter. Battery-conscious tracking, geofencing, SQLite persistence, HTTP sync, and headless execution for iOS & Android.

example/main.dart

// ignore_for_file: avoid_print

import 'package:tracelet/tracelet.dart' as tl;

/// Minimal example demonstrating Tracelet background geolocation.
Future<void> main() async {
  // 1. Subscribe to location events.
  tl.Tracelet.onLocation((location) {
    print(
      '๐Ÿ“ ${location.coords.latitude}, ${location.coords.longitude} '
      'ยท accuracy: ${location.coords.accuracy}m',
    );
  });

  // 2. Initialize the plugin with a configuration.
  final state = await tl.Tracelet.ready(tl.Config(
    geo: tl.GeoConfig(
      desiredAccuracy: tl.DesiredAccuracy.high,
      distanceFilter: 10,
    ),
    logger: tl.LoggerConfig(logLevel: tl.LogLevel.verbose),
  ));

  print('Tracelet ready โ€” enabled: ${state.enabled}, '
      'tracking: ${state.trackingMode}');

  // 3. Start tracking.
  await tl.Tracelet.start();
}
3
likes
0
points
196
downloads

Publisher

verified publisherikolvi.com

Weekly Downloads

Production-grade background geolocation for Flutter. Battery-conscious tracking, geofencing, SQLite persistence, HTTP sync, and headless execution for iOS & Android.

Homepage
Repository (GitHub)
View/report issues

Topics

#geolocation #location #background #geofencing

License

unknown (license)

Dependencies

collection, flutter, meta, tracelet_android, tracelet_ios, tracelet_platform_interface

More

Packages that depend on tracelet

Packages that implement tracelet