monorepo/dialer/lib/domain/models/voicemail.dart
AlexisDanlos ec3f13a34b
All checks were successful
/ mirror (push) Successful in 4s
/ build (push) Successful in 9m58s
/ build-stealth (push) Successful in 10m3s
refactor: add voicemail functionality with permissions handling and UI updates
2025-04-09 16:25:13 +02:00

31 lines
758 B
Dart

class Voicemail {
final String id;
final String phoneNumber;
final String? sender;
final DateTime timestamp;
final Duration duration;
final String? filePath;
final bool isRead;
Voicemail({
required this.id,
required this.phoneNumber,
this.sender,
required this.timestamp,
required this.duration,
this.filePath,
this.isRead = false,
});
factory Voicemail.fromMap(Map<String, dynamic> map) {
return Voicemail(
id: map['id'],
phoneNumber: map['phoneNumber'],
sender: map['sender'],
timestamp: DateTime.fromMillisecondsSinceEpoch(map['timestamp']),
duration: Duration(seconds: map['duration']),
filePath: map['filePath'],
isRead: map['isRead'] ?? false,
);
}
}