Flutterando/asp

Add value setter to RxList

arthurbcd opened this issue · 1 comments

Problem:

The following code below throws: "There isn't a setter named 'value' in class 'RxList'."

rxList.value = await _repository.getAll(id);

Suggested Solution:

@override
set value(int value) {
  _list.clear();
  _list.addAll(value);
  notifyListeners();
}

All Atom's have the setter value, whatsoever RxList doesn't. The inner value of an Atom should be mutable for consistency in all cases.

Suggestion:

Add the same setValue or even setValues that every Atom has, so we can use as tear-off.

    _repository
        .messagesStream(_session.id)
        .listen(_messages.setValues);