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

RemoveEmoji doesn't need to be instanced #12

Open
pharan opened this issue Dec 9, 2023 · 0 comments
Open

RemoveEmoji doesn't need to be instanced #12

pharan opened this issue Dec 9, 2023 · 0 comments

Comments

@pharan
Copy link

pharan commented Dec 9, 2023

All of RemoveEmoji's members are methods and no fields.

In everything-is-a-class Java or C# world, this would mean you make it a static class with all static method members, and the resulting API would be like:
RemoveEmoji.clean(myString)

but Dart style guide recommends the library way, just putting all the methods outside of a class at top level:
https://dart.dev/effective-dart/design#avoid-defining-a-class-that-contains-only-static-members

This lets users include and exclude methods from it as they need, and use dart's library functionality as designed.

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

1 participant