feat: 🌟 use column instead of stack to remove arbitrary paddings#196
feat: 🌟 use column instead of stack to remove arbitrary paddings#196jonasbadstuebner wants to merge 1 commit intoSimformSolutionsPvtLtd:mainfrom
Conversation
|
The screenshot you showed me is using a Stack I guess. |
|
I have shared a screenshot for your branch only. |
|
check this PR. #197 |
|
Are you talking about the padding above the text field? 😅 |
|
Or do you want to have the messages be shown behind the text field? |
|
Yes, it should be displayed behind the field, primarily behind the top corners of the text field. I initially tried using a column but then realized the reason for using a stack and reverted it back to a stack. 😅 |
425f716 to
5624473
Compare
|
I'm offering a better solution (and fixing a weird thing where I did not see any error or anything due to the config not having settings that would show anything). |
|
I could make the overflow smaller, but it is working. |
5624473 to
83b5896
Compare
|
Please test my changes again and let me know what you think. |
|
Hello @jonasbadstuebner, I tested your code and have found following two things:
Can you please address above mentioned changes and update your PR? |
83b5896 to
70e2cb5
Compare
aditya-css
left a comment
There was a problem hiding this comment.
The issue 2 from previously mentioned issues is resolved, but the first issue of texts appearing below the textfield still exists.
This is the current version from this PR:
https://github.com/SimformSolutionsPvtLtd/flutter_chatview/assets/98031138/bc564f35-088d-4e41-bf92-057ff0ece64c
This is what we desire:
https://github.com/SimformSolutionsPvtLtd/flutter_chatview/assets/98031138/a75c44b0-fab6-4249-8cef-125f302a1395
| clipBehavior: Clip.none, | ||
| children: [ | ||
| Positioned.fill( | ||
| bottom: -MediaQuery.of(context).size.height, |
There was a problem hiding this comment.
Ideally, this should be as big as the textfield is and not some large value like screen height.
There was a problem hiding this comment.
I cannot know how large the Textfield is, because the Textfield is built after the chat list.
There was a problem hiding this comment.
I found a different solution, let me know what you think after my next push.
| @override | ||
| Widget buildScrollbar( | ||
| BuildContext context, Widget child, ScrollableDetails details) { | ||
| switch (getPlatform(context)) { |
There was a problem hiding this comment.
Can you please convert this to switch expression?
There was a problem hiding this comment.
This is the way it is implemented in the parent class. I don't think the switch expression would help here, considering I would have to be very verbose.
| @@ -0,0 +1,32 @@ | |||
| import 'package:flutter/material.dart'; | |||
|
|
|||
| class CustomScrollBehavior extends ScrollBehavior { | |||
There was a problem hiding this comment.
I believe a more specific name would make more sense than just using custom as prefix.
There was a problem hiding this comment.
Do you have a recommendation?
BottomPaddedScrollBehavior?
|
Yes, I am not done with the implementation yet. But I will address your comments later. |
|
@jonasbadstuebner any progess? |


Description
Unless you have had a reason to make the setup stacked instead of a column in the first place, we can stop guessing the bottom inset for the chat message list now.
I don't like that you hardcoded the 100-height SizedBox.
Also I added the padding to the top of the Textfield, so we don't have to remember to put a bottom padding in all the other places.
Checklist
fix:,feat:,docs:etc).docsand added dartdoc comments with///.examplesordocs.Breaking Change?
Related Issues
part of #187