Skip to content

Message copyWith is setting roomId null #41

@Grubauer

Description

@Grubauer

In all message types, the copyWith methods roomId parameter is not _Unset like the rest. However, the assignment below checks for _Unset:

roomId: roomId == _Unset ? this.roomId : roomId as String?,

Therefore I have to manually copy my message with the roomId given:
messages[index] = message.copyWith(status: Status.error, roomId: message.roomId);

Otherwise the roomId is set to null, since it is not _Unset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions