feat: Add LocationTrackingService for GPS tracking and mesh network integration

- Implemented LocationTrackingService to handle GPS tracking, distance thresholds, and location broadcasting.
- Added permission handling, SharedPreferences persistence, and real-time position updates via callbacks.

feat: Introduce MapMarkerService for managing map markers

- Created MapMarkerService to generate contact and SAR markers, calculate distances, and manage marker display.
- Included methods for user location markers and distance/bearing calculations.

feat: Implement ValidationService for input validation and sanitization

- Developed ValidationService to validate coordinates, radio parameters, distances, time intervals, and names.
- Added parse and sanitize methods for common input types, ensuring robust error handling and user feedback.
This commit is contained in:
Janez T
2025-10-15 10:55:11 +02:00
parent d69a83fded
commit 276d0f4470
5 changed files with 1576 additions and 6 deletions

View File

@@ -60,6 +60,7 @@ class Message {
final int? suggestedTimeoutMs; // Suggested timeout from SENT response
final int? roundTripTimeMs; // RTT from SEND_CONFIRMED
final DateTime? deliveredAt; // When delivery was confirmed
final Uint8List? recipientPublicKey; // Full 32-byte public key of recipient (for retry)
Message({
required this.id,
@@ -80,6 +81,7 @@ class Message {
this.suggestedTimeoutMs,
this.roundTripTimeMs,
this.deliveredAt,
this.recipientPublicKey,
});
/// Get sender public key as hex string
@@ -182,6 +184,7 @@ class Message {
int? suggestedTimeoutMs,
int? roundTripTimeMs,
DateTime? deliveredAt,
Uint8List? recipientPublicKey,
}) {
return Message(
id: id ?? this.id,
@@ -202,6 +205,7 @@ class Message {
suggestedTimeoutMs: suggestedTimeoutMs ?? this.suggestedTimeoutMs,
roundTripTimeMs: roundTripTimeMs ?? this.roundTripTimeMs,
deliveredAt: deliveredAt ?? this.deliveredAt,
recipientPublicKey: recipientPublicKey ?? this.recipientPublicKey,
);
}