mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-12 00:40:28 +00:00
feat: Add display name getter to DeviceInfo and update usage in HomeScreen; refactor contact type handling in MapMarkers
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user