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

Image sending Empty Bubble displayed (BUG) #563

Closed
muthuremo opened this issue Feb 27, 2024 · 9 comments
Closed

Image sending Empty Bubble displayed (BUG) #563

muthuremo opened this issue Feb 27, 2024 · 9 comments
Labels
question Further information is requested

Comments

@muthuremo
Copy link

muthuremo commented Feb 27, 2024

Hello 👋

While sending the Image empty Bubble is displayed but on the API i have received the Image uri but on the UI not displayed go back and come again to the chatpage image displayed can u guys help this

Another exception was thrown: BoxConstraints has a negative minimum width.
Another exception was thrown: RenderBox was not laid out: _RenderEditableCustomPaint#f0c26 NEEDS-LAYOUT NEEDS-PAINT
chatimage

@muthuremo muthuremo added the question Further information is requested label Feb 27, 2024
@demchenkoalex
Copy link
Member

Hey! How do you send your image exactly?

@muthuremo
Copy link
Author

Hey! How do you send your image exactly?

Hi @demchenkoalex
I used the Bubble Builder and in the condition i use the imagemessage
else if (message is types.ImageMessage)
{
return Bubble
(
child: Stack
(
alignment: AlignmentDirectional.topEnd,
children:
[
Column
(
children:
[
Image.network
(
message.uri,
fit: BoxFit.cover,
),
],
),
Positioned
(
bottom: 0,
right: 8,
child: Text
(
formattedDateTime,
style: const TextStyle
(
fontSize: 10,
color: Colors.grey,
),
),
)
],
),
);
}

@muthuremo muthuremo changed the title Image sending Empty Bubble displayed Image sending Empty Bubble displayed (BUG) Feb 29, 2024
@muthuremo
Copy link
Author

Hey! How do you send your image exactly?

using the send_media(path,mediatype ) function has my API so that url is used on the Bubblebuilder to display the ImageMessage()

@muthuremo
Copy link
Author

Without Using the BubbleBuilder also it gets the empty bubble on the screen image is not rendering why it happening and is there any issue
gets ERROR like this

Another exception was thrown: BoxConstraints has a negative minimum width.
Another exception was thrown: RenderBox was not laid out: _RenderEditableCustomPaint#7c30b NEEDS-LAYOUT NEEDS-PAINT

@demchenkoalex
Copy link
Member

does example work for you? I have predefined messages json that contains some network images - https://github.com/flyerhq/flutter_chat_ui/blob/main/example/assets/messages.json

I understand that you just use Image.network with some URL that your backend returns? maybe you have an example URL I could use to pass it to the network image, see if it works?

@muthuremo
Copy link
Author

muthuremo commented Mar 4, 2024

it comes crtly but in the UI gets empty bubble gets go back and return gets image rendering from the result.path is not crty doing ? on photo
but i have used the BubbleBuilder() to used
if textmessage
else if imagemessage
else if filemessage
else return container()

@demchenkoalex
Copy link
Member

you also said that without bubble builder image is not rendering.. can you give me an example URL for the image and I will see?

@muthuremo
Copy link
Author

@muthuremo
Copy link
Author

muthuremo commented Mar 5, 2024 via email

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

No branches or pull requests

2 participants