We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using classes as enum has become obsolete since Dart 2.17, this tip could be removed !
https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/classes-as-enums-in-dart/classes-as-enums-in-dart.md
The text was updated successfully, but these errors were encountered:
also, it could be cleaner done through extension, i.e.
enum AnimalType{ dog, cat, parrot }; extension on AnimalType { static const _foodTypes =['meat', 'fish', 'fruit']; String get foodType => _foodTypes[index]; }
which could still be useful, if it's some local ui property, specific to current widget.
Sorry, something went wrong.
No branches or pull requests
Using classes as enum has become obsolete since Dart 2.17, this tip could be removed !
https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/classes-as-enums-in-dart/classes-as-enums-in-dart.md
The text was updated successfully, but these errors were encountered: