Comments (17)
@winsdom123456 Thanks for reporting this issue, I investigated it and it only turns up in small phones I have fixed this and release a patched version 1.0.6
try this and let me know if you face any problem.
from dash_chat.
@winsdom123456 Thanks for reporting this issue, I investigated it and it only turns up in small phones I have fixed this and release a patched version
1.0.6
try this and let me know if you face any problem.
I tried the 1.0.6 version. Still seems to be an issue.
from dash_chat.
@fayeed YES, I have tried the smallest phone, and it is OK now, thanks!
from dash_chat.
@thevzurd You should make sure you are using the version 1.0.6, I think it will be OK, wait for your result
from dash_chat.
@fayeed @winsdom123456 , no the fix is still not working for me. :(
from dash_chat.
@fayeed Oh, I found this bug again in debug version. I found it is OK in profile version, but not in debug version in small iPhone, you can have a try.
from dash_chat.
@winsdom123456 @thevzurd thanks I will take a look at it once more, anyway what devices did you guys saw this issue in?
from dash_chat.
@fayeed I use Moto X, Android version 5.1
from dash_chat.
@fayeed also in my screenshot, why do you this there is space below the text ?
from dash_chat.
@thevzurd @winsdom123456 The problem was the avatar container was not responsive that is it had a fixed height & width of 40.0
which would create problems is small devices. Anway I have fixed the issue and released a new version 1.0.7
.
from dash_chat.
@thevzurd As for the extra space that is visible in the image below the text I am not able to reproduce it.
from dash_chat.
@fayeed still the same issue. I notice that the avatar has shrunken in size.
from dash_chat.
@thevzurd @winsdom123456 The problem was the avatar container was not responsive that is it had a fixed height & width of
40.0
which would create problems is small devices. Anway I have fixed the issue and released a new version1.0.7
.
I think ListTile widget should help you solve this issue, because it is responsive by design. The avatar will come in leading and the chat message + the time stamp will come in the tilte/subtitle.
from dash_chat.
@thevzurd I just tested on a device with 240x432 resolution and also a 480x800 and it works perfectly.
Can you show me your code?
from dash_chat.
class _ChatFeedBody extends StatefulWidget {
const _ChatFeedBody({this.user, this.conversationsId});
final ChatUser user;
final String conversationsId;
@override
_ChatFeedBodyState createState() => _ChatFeedBodyState();
}
class _ChatFeedBodyState extends State<_ChatFeedBody> {
final GlobalKey<DashChatState> _chatViewKey = GlobalKey<DashChatState>();
@override
Widget build(BuildContext context) {
return StreamBuilder<List<Chat>>(
stream: Provider.of<ChatBloc>(context).getChats(),
builder: (BuildContext context, AsyncSnapshot<List<Chat>> snapshot) {
if (!snapshot.hasData) {
return Center(
child: CircularProgressIndicator(
valueColor: AlwaysStoppedAnimation<Color>(
Theme.of(context).primaryColor,
),
),
);
} else {
List<ChatMessage> messages = snapshot.data
.map((Chat chat) => ChatMessage(
id: chat.id.id,
text: chat.text,
user: ChatUser(
uid: chat.user.id.id,
name: chat.user.displayName,
avatar: chat.user.avatarURL,
),
image: chat.attachmentType == AttachmentType.image
? chat.attachmentUrl
: '',
vedio: chat.attachmentType == AttachmentType.video
? chat.attachmentUrl
: '',
createdAt: chat.createdAt,
/* quickReplies: QuickReplies(
values: <Reply>[
Reply(
title: "😋 Yes",
value: "Yes",
),
Reply(
title: "😞 Nope. What?",
value: "no",
),
],
), */
))
.toList();
return DashChat(
key: _chatViewKey,
inverted: false,
onSend: (ChatMessage message) {},
user: widget.user,
inputDecoration:
InputDecoration.collapsed(hintText: 'Add message here...'),
dateFormat: DateFormat('yyyy-MMM-dd'),
timeFormat: DateFormat('HH:mm'),
messages: messages,
showUserAvatar: true,
showAvatarForEveryMessage: false,
scrollToBottom: false,
onPressAvatar: (ChatUser user) {
print('OnPressAvatar: ${user.name}');
},
onLongPressAvatar: (ChatUser user) {
print('OnLongPressAvatar: ${user.name}');
},
inputMaxLines: 5,
messageContainerPadding:
const EdgeInsets.only(left: 5.0, right: 5.0),
alwaysShowSend: true,
inputTextStyle: TextStyle(fontSize: 16.0),
inputContainerStyle: BoxDecoration(
border: Border.all(width: 0.0),
color: Colors.white,
),
onQuickReply: (Reply reply) {
setState(
() {
messages.add(
ChatMessage(
text: reply.value,
createdAt: DateTime.now(),
user: widget.user),
);
// ignore: sdk_version_ui_as_code
messages = <ChatMessage>[...messages];
},
);
},
);
}
},
);
}
}
from dash_chat.
@thevzurd so there are two things first is that empty space below the text message it is because you are setting the image
and vedio
property of ChatMessage
to empty string it needs to be null
.
The second problem is that you are setting the showUserAvatar
to true
which was breaking the UI anway I have fixed that too, checked the new version 1.0.8
.
from dash_chat.
Working now... thanks
from dash_chat.
Related Issues (20)
- [Bug] Old Chat messages are not aligned with sender to the right HOT 1
- [Question] Does this have null safety? HOT 5
- [Question] Why is it necessary for scrollNotificationFunc to always return true?
- 1.1.16 cannot show emojis HOT 4
- how to use flutter dash_chat with dialogflow?
- why dash_chat support 3 Quick Replies limited at 3? in flutter any idea
- how i use flutter_dialogflow with dashchat to my app flutter
- Can't open chat emoji dash_chat: ^1.1.16 HOT 5
- does the package support sending videos and files ?
- [Feature request] Your title
- [Question] about messageTextBuilder HOT 1
- does 2.0 release? HOT 5
- [Bug] default DateBuilder is wrong when scrolling HOT 1
- [Feature request] ListView.custom to prevent widgets from rebuilding
- [Question] Is it possible to send a new message programmatically?
- How to show sender name or auth anme in massage box list? and also emoji are not working in chat.
- [Feature request] Voice
- Invalid image data
- Null check operator used on a null value
- padding between messages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dash_chat.