Map<String, dynamic> toMap() { return <String, dynamic>{ 'message': message, 'severity': severity, 'type': type, }; }