Skip to content

documentation: unmodifable metadata #877

@qeepcologne

Description

@qeepcologne

don't know which version exactly changes that, but after updating, our app got broken:
Unsupported operation: Cannot modify unmodifiable map
Message was unmodifiable long time, but metadata wasn't.

example::
message.metadata?.remove('btn_smile_back');

i have to change that into:

chat.Message updatedMsg = message.copyWith(
  metadata: Map<String, dynamic>.from(message.metadata!)..remove('btn_smile_back'),
);
_chatController.updateMessage(message, updatedMsg);

I'm totally fine with the change, but it should be mentioned in changelog.

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