-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed as not planned
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: duplicateIssue is closed as a duplicate of an existing issueIssue is closed as a duplicate of an existing issue
Description
Use case/Problem
I couldn't find a native way to add badges to icons without doing some workaround with extra widgets. This seem to be allowed by the material design guidelines and they even show examples using it. Material design badging
I also found some open issues related with this topic, such as Add support for Badges on BottomNavigationBarItems.
Proposal
Extend Icon() API adding a badge like the follow example:
Icon.badge(
Icons.settings,
badge: Badge(
visible: true,
type: BadgeType.numeric,
maxValue: 20
value: 10),
);Where the type would be enum with values like:
enum BadgeType {
numeric,
boolean,
}In case of boolean
the badge only would display the single point at the corner of the Icon as follows.
In case of numeric
the badge would show the given value (or the max value with the + suffix if the value surpasses it)


Zazo032, MiladAtef, MCarlomagno, edeuss, saadman-sakib and 7 more
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: duplicateIssue is closed as a duplicate of an existing issueIssue is closed as a duplicate of an existing issue
