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

Hide the Flutter badge widget at import level #123

Open
richirisu opened this issue Dec 1, 2023 · 1 comment
Open

Hide the Flutter badge widget at import level #123

richirisu opened this issue Dec 1, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@richirisu
Copy link

I would like to suggest an alternative way of importing the badges package while avoiding a conflict with the newly added Flutter badge widget.

The idea is to simply hide the Flutter badge widget.

This way you can still use the Badge class name as is. It also helps with having to rewrite your old code because you don't need to use a prefix this way.

import "package:badges/badges.dart";
import "package:flutter/material.dart" hide Badge;
@yadaniyil
Copy link
Collaborator

@richirisu this is a great idea, thanks!
@M-ixai-L please test if this works fine and make a PR with updated README.md to let people know that there is an easier way to import badges

@yadaniyil yadaniyil added the enhancement New feature or request label Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants