Repository navigation
Image keyboard support #20796
Description
Activity
- addedc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.
on Aug 19, 2018 - addeda: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problems
on Jan 3, 2019 This came up internally as well as a question. Could we get a comment on the difficulty of this request? It feels like a fairly large one to be able to insert an image to Flutter via IME.
Reacted by Greg PriceIs there any known workarounds? This basically prevents using flutter in any app which has chat functionality for younger audience...
Reacted by moru0011, Animesh Jain, Boehrsi, Robert Virkus, AxesandGrinds, Sebastian Roth, Khoshbin Ali Ahmed, Nickolay Savchenko, kari538, Geetansh Jindal and 3 moreStill having a problem with this one. I can't send a gif/sticker. I'm working with a chat app.
Please is there any update on this?
would be fine to at least have a custom callback for special content on TextField. Not necessary to implement full blown richtext editor ..
Reacted by Murshid Chowdhury, AxesandGrinds, Victor, Nickolay Savchenko, Irfan, Geetansh Jindal, riddhimobilefirst, cedvdb and Josh JunckerReacted by Avaaj Gyawali, Khristian, Toni Wagner, Robert Virkus, AxesandGrinds, Sebastian Roth and Geetansh Jindal+1 for the chat use case. Most keyboards have some way to search for GIFs and chat is no fun without all those memes!
Reacted by Toni Wagner, Boehrsi, Robert Virkus, Khristian, Akshay H Mulky, moru0011, AxesandGrinds, Sebastian Roth, Jorge Menjivar, Victor and 9 moreI am also interested in a workaround. Not to be able to use images from the Android and iOS keyboards is a major constraint for any communication app.
Reacted by Khristian, Akshay H Mulky, florianhaar, moru0011, AxesandGrinds, Sebastian Roth, QuentinSc, Jorge Menjivar, Irfan, Edwin Liu and 2 moreI'm designing a chat app. Not having this feature just makes me feel like a fool for even attempting to use flutter for this app. And I have already gotten really far, I've developed most of the app, >70% and I can't send gifs or stickers, this is in fact evil of the flutter team.
Reacted by Joel Hernández, Robert Virkus, QuentinSc, Jorge Menjivar, Stephen Starkey, Victor, Joel Trottier-Hebert, Geetansh Jindal and Nabil A. JaeranReacted by Eric Hegnes, Kosh Alsirjani, Shyam Bihari Swami, Jimmy Forrester-Fellowes, Joel Trottier-Hebert, Gilbert Erik Garcia, Christian Eichmueller, joostvhts, Babey D. Tonny, rainbunny and 1 more+1 it's a use case Flutter must covered
Hi guys any solution on this yet? We are really waiting :)
64 remaining items
Yes, you need a Linux or macOS system to compile the engine and use it on release mode. Unfortunately Windows cannot compile so you would be out of luck to make a release build.
Really looking forward to this.
Reacted by 4mitabhFrom new feature request scan: @justinmc @GaryQian What is the status of this issue? What is left after flutter-team-archive/engine#35619?
Reacted by 4mitabh and rainbunnyThe framework PR (#110052) is all that remains, and I owe it a review. Will post one today or tomorrow.
Reacted by 4mitabh and ThomasReacted by rainbunny and 4mitabhReally waiting for this
Reacted by 4mitabh and ThomasJust an update, with Flutter 3.7, the GIF insertion code is now in the stable engine! All that's left is the merge into the flutter SDK repo here. But this also makes it much easier to manually implement the GIF insertion stuff on the SDK side of things (at least until the PR is merged). No more need to build the engine yourself.
I'll share our merged 3.7 SDK code with GIF insertion here when we've completed the merge. Should be shortly.
Reacted by Matt Hicks, Greg Price and rainbunnyReacted by Sami and Greg PriceHere is the SDK with the GIF insertion code merged into it: https://github.com/BlueBubblesApp/flutter
To use it just follow these instructions:
cdinto your flutter repo code on your host (~/snap/flutter/commonif you're on Linux)- Run:
git remote add upstream [email protected]:BlueBubblesApp/flutter.git - Run:
git pull upstream master
And that should be it. Now you can use the custom GIF insertion code with your text fields by adding a new parameter, like so:
contentInsertionConfiguration: ContentInsertionConfiguration(onContentInserted: (KeyboardInsertedContent content) { # ... your code handling the content })Edit: keep in mind, this is technically not merged into the stable branch of flutter, so it's still subject to changes. That said, I think all the changes that Google has requested, we've fulfilled. So there shouldn't be anything major needing to be changed, and should be compatible with the SDK when it eventually does get merged in.
Also, to reset your flutter install (remove the GIF insertion code), just run
git reset --hard origin/stablein your repo.Reacted by Jonah Walker, Greg Price, 4mitabh and rainbunnyFYI to everyone, this has been merged into Flutter! Shout out to @tneotia for getting it done! #110052 (comment)
Reacted by Justin McCandless, Matt Hicks, Greg Price, 4mitabh, rainbunny, Social Jawn and Tushar SadhwaniWas really looking forward to this, nice to know it is now supported. Is the guidance to just use the master channel to use this feature for now until it is in the stable channel?
Yes, it's in 3.8.0-7.0.pre which is currently only available on master.
3. git pull upstream master
very very thank you. It worked. You really did me a favor.
But in fact the directory is "~/snap/flutter/common/flutter" on my computer(Ubuntu 20.04)This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Mar 3, 2023
It is possible to implement Commit Content API using Flutter's TextField or TextFormField or any widget?
https://developer.android.com/guide/topics/text/image-keyboard
I am not sure convert this line
layout.addView(createEditTextWithContentMimeTypes(new String[]{"image/gif"}));
from this code example
https://github.com/googlesamples/android-CommitContentSampleApp/blob/master/app/src/main/java/com/example/android/commitcontent/app/MainActivity.java