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

asList() always returns a new instance #278

Open
reneky opened this issue May 10, 2023 · 1 comment
Open

asList() always returns a new instance #278

reneky opened this issue May 10, 2023 · 1 comment
Assignees

Comments

@reneky
Copy link

reneky commented May 10, 2023

It would be nice if it created the immutable List on the first call, so that it can be used for Angular Dart @input

@davidmorgan
Copy link
Contributor

Thanks for the suggestion.

Does it not work to use the BuiltList directly? It is Iterable, after all.

We wouldn't want to add a field to BuiltList just for this as it would be trading memory in every case to support an occasional use case. An alternative implementation would be to use an "expando".

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

No branches or pull requests

2 participants