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

removeAt(index) #28

Open
masalha-alaa opened this issue Feb 6, 2024 · 2 comments
Open

removeAt(index) #28

masalha-alaa opened this issue Feb 6, 2024 · 2 comments

Comments

@masalha-alaa
Copy link

masalha-alaa commented Feb 6, 2024

Great package, but if there's an elementAt method, why isn't there a removeAt method? Currently to imitate that I do mySet.remove(mySet.elementAt(index)).

Is it possible to add a removeAt() method that accepts an index and removes the item at that index?

@spydon
Copy link
Member

spydon commented Feb 6, 2024

The elementAt comes from Dart's IterableMixin, hence why we haven't added any removeAt method.
https://api.dart.dev/stable/2.7.2/dart-collection/IterableMixin-class.html

It wouldn't hurt to have that method though, so if you want to add it, feel free to put up a PR. :)

@masalha-alaa
Copy link
Author

Got it, thanks. I have only about 10 days experience in Flutter & Dart, so I'll leave it to someone else 😄
For now I'll be using mySet.remove(mySet.elementAt(index))

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

2 participants