import 'package:famedlysdk/matrix_api.dart'; class ToDeviceEvent extends BasicEventWithSender { Map encryptedContent; String get sender => senderId; set sender(String sender) => senderId = sender; ToDeviceEvent({ String sender, String type, Map content, this.encryptedContent, }) { senderId = sender; this.type = type; this.content = content; } ToDeviceEvent.fromJson(Map json) { final event = BasicEventWithSender.fromJson(json); senderId = event.senderId; type = event.type; content = event.content; } } class ToDeviceEventDecryptionError extends ToDeviceEvent { Exception exception; StackTrace stackTrace; ToDeviceEventDecryptionError({ ToDeviceEvent toDeviceEvent, this.exception, this.stackTrace, }) : super( sender: toDeviceEvent.senderId, content: toDeviceEvent.content, type: toDeviceEvent.type, ); }