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

onChipTapped not yet implemented #22

Closed
technolion opened this issue Oct 10, 2019 · 4 comments
Closed

onChipTapped not yet implemented #22

technolion opened this issue Oct 10, 2019 · 4 comments

Comments

@technolion
Copy link

technolion commented Oct 10, 2019

I tried to use 'onChipTapped' as described here:
https://pub.dev/documentation/flutter_chips_input/latest/flutter_chips_input/ChipsInput/onChipTapped.html

It seems to be not yet implemented. Any chance to get that functionality soon?

I am using version 1.5.1.

@danvick
Copy link
Owner

danvick commented Nov 6, 2019

Hi @technolion,
I decided against the usage of onChipTapped method because the user creates their own InputChip widget within chipBuilder. So to implement such functionality you'd have it like this:

chipBuilder: (context, state, profile) {
    return InputChip(
        key: ObjectKey(profile),
        label: Text(profile.name),
        avatar: CircleAvatar(
            backgroundImage: NetworkImage(profile.imageUrl),
        ),
        onDeleted: () => state.deleteChip(profile),
        materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
        onPressed: //YOUR METHOD HERE,
    );
},

@danvick
Copy link
Owner

danvick commented Nov 6, 2019

I don't think there's a way to access the InputChips from within the library. The attribute should have actually been removed.

@technolion
Copy link
Author

@danvick thanks for the feedback. Great, so we implement the method on our inserted InputChip.
But should'nt the onChipTapped callback be removed in your Code and in the documentation?

@danvick
Copy link
Owner

danvick commented Nov 6, 2019

Yeah, thanks to your keen eye, that has been rectified.
Much appreciated.

Cheers!

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