-
Notifications
You must be signed in to change notification settings - Fork 807
Feat/text in other types #833
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
base: main
Are you sure you want to change the base?
Conversation
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 :) |
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