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

[Feature request] Custom icon #19

Closed
lifenautjoe opened this issue Nov 9, 2018 · 6 comments
Closed

[Feature request] Custom icon #19

lifenautjoe opened this issue Nov 9, 2018 · 6 comments

Comments

@lifenautjoe
Copy link

Hey there,

First of all, thanks for creating this great library :-).

In my current project we have a custom IconSet, which we would like to use with this, however the implementation has the icon argument locked to being a material Icon.

Is there any chance of being able to provide a custom one?

Cheers,
Joel.

@AndreHaueisen
Copy link
Owner

@lifenautjoe Hi. Thanks man!

You can use any Icon you want. You only have to make sure to pass in the right IconData
If you need Cupertino icon for examples, you need to include cupertino_icons: ^0.1.2 dependency (make sure you run 'flutter clean' after adding the dependency) so you can use:

icon = Icon( CupertinoIcons.eye, ) // for example

Here is an example on IconData

@lifenautjoe
Copy link
Author

Hi Andre,

Thanks for the reply!

I meant completely custom Icons, not built by the flutter team.

Could be anything arbitrary, like an Image or even a Text widget.

It's the same principle as flutter does with their buttons or navigation bars in which they allow any kind of Widget to be placed as an icon.

@AndreHaueisen
Copy link
Owner

That would require accepting a Widget instead of Icon as an argument. I'm not sure I'm comfortable with the idea. Sometimes a lot of customization can make things overly complicated. Let me make some tests and think about it a bit more.

@lifenautjoe
Copy link
Author

lifenautjoe commented Nov 11, 2018 via email

@AndreHaueisen
Copy link
Owner

@lifenautjoe
Version 1.1.2 includes your request.
Thanks for your feedback.

@lifenautjoe
Copy link
Author

lifenautjoe commented Nov 25, 2018 via email

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

No branches or pull requests

2 participants