-
Notifications
You must be signed in to change notification settings - Fork 30.5k
Proposal to add an IconImage widget #126038
Copy link
Copy link
Open
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: imagesLoading, displaying, rendering imagesLoading, displaying, rendering imagesc: 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.team-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: imagesLoading, displaying, rendering imagesLoading, displaying, rendering imagesc: 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.team-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Type
Fields
Give feedbackNo fields configured for issues without a type.
Is there an existing issue for this?
Use case
Just like one can create ImageProviders from assets, network, and memory. There should be a way to create an image from IconData. It will save a lot of time and will be very convenient as the builtin icons can be directly used instead of downloading it as a png/jpg and adding it to the assets.
We already have a ImageIcon widget. Why not have something the other way around?
Example Use Case:
SwitchListTile requires activeThumbImage and inactiveThumbImage which need to be ImageProviders. I want to use pre-built icons that are already shipped with flutter, but unable to do so directly as there is no way to convert an icon into an image.
Proposal
An IconImage widget that provides Icons.heart (example) as an Image.