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

Add support for TextField's contentInsertionConfiguration property in StreamMessageInput #1613

Closed
1 task done
fryeap opened this issue Jun 16, 2023 · 3 comments · Fixed by #1624
Closed
1 task done
Labels
enhancement New feature or request next_release It will be fixed in the next release

Comments

@fryeap
Copy link

fryeap commented Jun 16, 2023

Please select which package this feature is related to

stream_chat_flutter

Which platforms would this feature impact?

Android

Is your feature request related to a problem?

Android's Gboard supports adding gifs and images directly from the keyboard. However, the TextField widget only supports plain text by default. Unless the contentInsertionConfiguration callback is provided, a toast message is displayed informing the user that the text field does not support inserting media content.

Describe the solution that you'd like

The StreamMessageInput already accepts TextField attributes as part of its constructor parameters that are passed through to the text field. It would be a great help if a parameter that accepted the contentInsertionConfiguration callback were added as an additional optional parameter.

Describe alternatives that you have considered

We have built our own message input widget that includes this parameter.

Additional context

https://api.flutter.dev/flutter/material/TextField/contentInsertionConfiguration.html

Code of Conduct

  • I agree to follow this project's Code of Conduct
@nosmirck
Copy link
Contributor

this is not available in 3.7.12-stable which made the 6.4.0 release unusable with flutter versions previous to 3.10.

Please remove this feature before releasing stream_chat_flutter with full compatibility for flutter 3.10

When using 6.4.0 we get the error 'type ContentInsertionConfiguration not found' and since 6.3.0 is broken, we have to go to 6.2.0 which has issues fixed in these 2 latest versions.

@xsahil03x
Copy link
Contributor

xsahil03x commented Jun 30, 2023

Hey @fryeap, we reverted the commit due to incompatibility with flutter 3.7.0 as mentioned above. I advise to please also revert your changes back to what you were using before. We will try to add the support later in a major version. 🙏🏼

Thanks.

@leossmith
Copy link

Is there a guide on how to use this to either past a photo from keyboard or select a gif (android)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request next_release It will be fixed in the next release
Projects
None yet
4 participants