flutter_traccar_api library
Flutter Traccar API Plugin
A comprehensive Flutter plugin for integrating with Traccar GPS tracking server. Provides authentication, device management, position tracking, and reporting capabilities.
Features:
- Basic authentication with credential caching
- Device and position management
- Event and command handling
- Comprehensive reporting (trips, stops, summary, distance)
- Secure credential storage
Classes
- AlertTypeCount
- Attribute
- Attribute model for Traccar API Based on official Traccar API specification
- Attributes
- AuthManager
- Authentication manager that handles login, logout, and credential caching using secure storage for persistent authentication state
- BatchConfig
- Configuration for request batching
- BatchedRequest
- Represents a batched request
- BatchStats
- Batch statistics
- CacheConfig
- Configuration for cache behavior
- CacheEntry
- Cache entry with metadata
- CacheHealthStatus
- Cache health status
- CacheInterceptor
- Dio interceptor for automatic API response caching
- CacheInterceptorConfig
- Configuration for cache interceptor
- CacheManager
- Comprehensive cache manager for API responses
- CacheStats
- Cache statistics
- CacheUtils
- Cache utilities
- Calendar
- Calendar model for Traccar API Based on official Traccar API specification
- CellTowers
- Command
- CommandType
- CommandType model for Traccar API Based on official Traccar API specification
- Device
- DeviceAccumulators
- DeviceAccumulators model for Traccar API Based on official Traccar API specification
- Driver
- Driver model for Traccar API
- ErrorHandler
- Utility class for handling and converting errors to appropriate exceptions
- Event
- FlutterTraccarApi
- Main Flutter Traccar API class
- Geofence
- Group
- Group model for Traccar API Based on official Traccar API specification
- HttpClientConfig
- Configuration class for HTTP client settings
- HttpService
- Base HTTP service class that handles all network requests with Dio integration, authentication support, rate limiting, batching, and advanced features
- Maintenance
- Maintenance model representing a maintenance schedule or record Based on official Traccar API specification
- MaintenanceAlert
- Maintenance alert model for UI display
- Network
- NotificationType
- NotificationType model for Traccar API Based on official Traccar API specification
- Permission
- Permission model for Traccar API Based on official Traccar API specification
- Position
- PositionList
- RateLimitConfig
- Configuration for rate limiting
- RateLimiter
- Rate limiter implementation using token bucket algorithm
- RateLimiterManager
- Global rate limiter manager
- RateLimitInterceptor
- Dio interceptor for rate limiting
- RateLimitInterceptorConfig
- Configuration for rate limiting interceptor
- RateLimitInterceptorFactory
- Factory for creating rate limit interceptors
- RateLimitStatus
- Rate limit status information
- ReportDistance
- ReportSummary
- RequestBatcher
- Request batcher for optimizing API calls
- Server
- Server model for Traccar API Based on official Traccar API specification
- Session
- Statistics
- Statistics model for Traccar API Based on official Traccar API specification
- StopsReport
- TraccarApiService
- Main Traccar API service that provides all API endpoints with authentication and caching support
- Trips
- User
- User model for Traccar API Based on official Traccar API specification
- WebSocketConfig
- Configuration for WebSocket service
- WebSocketService
- WebSocket service for real-time communication with Traccar server
Enums
- MaintenanceFilter
- Maintenance filter enum
- WebSocketStatus
- WebSocket connection status enumeration
Mixins
- BatchingCapable
- Mixin for adding batching capabilities to HTTP clients
- CacheAwareHttpClient
- Cache-aware HTTP client mixin
Extensions
Exceptions / Errors
- AuthenticationException
- Exception thrown when authentication fails
- AuthorizationException
- Exception thrown when user is not authorized to access a resource
- CacheException
- Exception thrown when caching operations fail
- CommandException
- Exception thrown when command operations fail
- ConfigurationException
- Exception thrown when configuration is invalid
- DeviceException
- Exception thrown when device operations fail
- GeofenceException
- Exception thrown when geofence operations fail
- NetworkException
- Exception thrown when a network error occurs
- NotFoundException
- Exception thrown when a resource is not found
- RateLimitException
- Exception thrown when rate limit is exceeded
- ReportException
- Exception thrown when report generation fails
- ServerException
- Exception thrown when server returns an error
- StorageException
- Exception thrown when secure storage operations fail
- TraccarException
- Custom exceptions for Traccar API operations
- ValidationException
- Exception thrown when request validation fails