Open
Conversation
Contributor
Author
|
I think this is now ok. A bit more regarding the layout for images. final Widget content = Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (widget.topWidgets != null) ...widget.topWidgets!,
Flexible(
child: imageContent
),Caused the image to be aligned I tried I opted for: final Widget content = Column(
final Widget content = Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (widget.topWidgets != null) ...widget.topWidgets!,
Flexible(
child:
widget.message.text != null
? Row(
mainAxisSize: MainAxisSize.max,
children: [Expanded(child: imageContent)],
)
: imageContent,
),which works well but it will also cause the bubble to expand to the max constrained with of the parent column when there is a text, no matter the text lenght or image dimension. Could not think of something better, maybe you will :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
This code is build on top of PR #814
Attemp to address #826
Notes on Render of images
I'm not perfectly happy with the rendering of the ImageMessage ones: if the text is longer than the image then we end up with space around the image (see screenshot below). But since the main bubble width is unconstraint and i did not want to rely on IntrinsicWidth to constraint the text width to the image one I see no other solution.
sidenote
Most messages UI widget now share quite a lot of logic. I wonder if they should not all rely on a utility package that would expose the main "Stack + Column" builder, time and status, and maybe the style resolvers