Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using rx_iterables classes #3238

Open
kim-jinmo opened this issue Oct 14, 2024 · 1 comment
Open

Error when using rx_iterables classes #3238

kim-jinmo opened this issue Oct 14, 2024 · 1 comment
Assignees

Comments

@kim-jinmo
Copy link

Hello.

First of all, I am not good at English, so I am asking you to use a translator. Please understand.

I am using get: 5.0.0-release-candidate-9.2.1 version.
I am getting an error when using RxList like the example below.

final list = RxList<String>();
list.add("temp");
error : type 'String' is not a subtype of type 'Never' of 'value'
final list = RxList<String>();
list.clear();
error : Unsupported operation: Cannot change the length of an unmodifiable list

Other classes also get an error for the same reason. (e.g. RxMap)

I think the reason for the error is that in the RxList class, if the constructor's argument is empty, a const [] value is assigned.

I think that if the constructor's argument is empty, a [] value should be assigned.

Is there a reason why you intentionally used const []?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@jonataslaw @kim-jinmo and others