Skip to content

Hide the Flutter badge widget at import level #123

@richirisu

Description

@richirisu

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;

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions