feat: Add display name getter to DeviceInfo and update usage in HomeScreen; refactor contact type handling in MapMarkers

This commit is contained in:
Janez T
2025-10-14 11:18:59 +02:00
parent 373998bc7d
commit ccec842672
8 changed files with 1285 additions and 22 deletions

View File

@@ -114,6 +114,15 @@ class DeviceInfo {
.join('');
}
/// Get display name with "MeshCore-" prefix removed
String? get displayName {
if (deviceName == null) return null;
if (deviceName!.startsWith('MeshCore-')) {
return deviceName!.substring(9); // Remove "MeshCore-" (9 characters)
}
return deviceName;
}
DeviceInfo copyWith({
String? deviceId,
String? deviceName,