MessageVoiceToTextInfo.fromMap constructor

MessageVoiceToTextInfo.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory MessageVoiceToTextInfo.fromMap(Map<String, dynamic> map) {
  return MessageVoiceToTextInfo(
    text: map['text'] as String? ?? '',
    convertedAt: map['convertedAt'] is int
        ? map['convertedAt'] as int
        : int.tryParse('${map['convertedAt']}') ?? 0,
    source: map['source'] as String? ?? 'manual',
  );
}