Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How can i use icon from image asset ? #381

Open
roofiah opened this issue Sep 9, 2022 · 2 comments
Open

How can i use icon from image asset ? #381

roofiah opened this issue Sep 9, 2022 · 2 comments

Comments

@roofiah
Copy link

roofiah commented Sep 9, 2022

How can i use icon from image asset?

SlidableAction( onPressed: null, backgroundColor: Color(0xFFEEB4B0), foregroundColor: Colors.white, icon: Image.asset('assets/icon/trash.png'), label: 'Delete', ),

@vinguyentruong
Copy link

This issue is same with #383

@Petri-Oosthuizen
Copy link

If the icon can be made an SVG you can add it to a font. After doing this you'll be able to add the custom icon, CustomIcons.trash, to the IconData icon field. Something like https://www.fluttericon.com comes in very handy here. For more info search 'flutter custom icons'.

Sidenote: the icon SVG container must be a square.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants