Closed iammuho closed 6 months ago
Describe the bug When we are listening the notifications from the socket, the subject + content is being null, because fromDTO doesn't parse them.
https://github.com/heroiclabs/nakama-dart/blob/main/lib/src/models/notification.dart#L24-L30
Reproduction Code
socket .onNotifications .listen((notification) { print(notification.subject); print(notification.content); });
It'll give the null values.
null
Expected behavior Subject and content are filled with the values.
Solution:
factory Notification.fromDto(api.Notification dto) => Notification( id: dto.id, code: dto.code, subject: dto.subject, content: dto.content, senderId: dto.senderId, createTime: dto.createTime.toDateTime(), persistent: dto.persistent, );
Thank you for reporting, I'll fix that an release a patch version.
Describe the bug When we are listening the notifications from the socket, the subject + content is being null, because fromDTO doesn't parse them.
https://github.com/heroiclabs/nakama-dart/blob/main/lib/src/models/notification.dart#L24-L30
Reproduction Code
It'll give the
null
values.Expected behavior Subject and content are filled with the values.
Solution: