Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

Implementation of cast methods allows mutation without notifications. #92

@markegli

Description

@markegli

Changes on ObservableMap and ObservableList objects created via cast or castFrom mutate the original collections but do not trigger notifications on the original collections.

final original = ObservableList<int>.from([1, 2, 3]);
original.changes.listen(print); // Listener never triggered.
final cast = original.cast<num>();
cast.add(4);
print(original); // Prints [1, 2, 3, 4].
await Future(() {}); // Flush any microtasks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions