fix author theme and messageinput background
This commit is contained in:
@@ -596,7 +596,7 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
|
|||||||
elevation: 2,
|
elevation: 2,
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
backgroundColor: StreamChatTheme.of(context).colorTheme.white,
|
backgroundColor: StreamChatTheme.of(context).channelTheme.inputBackground,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topLeft: Radius.circular(16),
|
topLeft: Radius.circular(16),
|
||||||
|
|||||||
@@ -234,64 +234,66 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Widget child = SafeArea(
|
Widget child = Container(
|
||||||
child: GestureDetector(
|
color: StreamChatTheme.of(context).channelTheme.inputBackground,
|
||||||
onPanUpdate: (details) {
|
child: SafeArea(
|
||||||
if (details.delta.dy > 0) {
|
child: GestureDetector(
|
||||||
_focusNode.unfocus();
|
onPanUpdate: (details) {
|
||||||
if (_openFilePickerSection) {
|
if (details.delta.dy > 0) {
|
||||||
setState(() {
|
_focusNode.unfocus();
|
||||||
_openFilePickerSection = false;
|
if (_openFilePickerSection) {
|
||||||
});
|
setState(() {
|
||||||
|
_openFilePickerSection = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
child: Column(
|
||||||
child: Column(
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisSize: MainAxisSize.min,
|
children: [
|
||||||
children: [
|
if (_hasQuotedMessage)
|
||||||
if (_hasQuotedMessage)
|
Padding(
|
||||||
Padding(
|
padding: const EdgeInsets.fromLTRB(8, 8, 8, 0),
|
||||||
padding: const EdgeInsets.fromLTRB(8, 8, 8, 0),
|
child: Row(
|
||||||
child: Row(
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
children: [
|
||||||
children: [
|
Padding(
|
||||||
Padding(
|
padding: const EdgeInsets.all(8.0),
|
||||||
padding: const EdgeInsets.all(8.0),
|
child: StreamSvgIcon.reply(
|
||||||
child: StreamSvgIcon.reply(
|
color: StreamChatTheme.of(context)
|
||||||
color: StreamChatTheme.of(context)
|
.colorTheme
|
||||||
.colorTheme
|
.greyGainsboro,
|
||||||
.greyGainsboro,
|
),
|
||||||
),
|
),
|
||||||
),
|
Text(
|
||||||
Text(
|
'Reply to Message',
|
||||||
'Reply to Message',
|
style: TextStyle(fontWeight: FontWeight.bold),
|
||||||
style: TextStyle(fontWeight: FontWeight.bold),
|
),
|
||||||
),
|
IconButton(
|
||||||
IconButton(
|
visualDensity: VisualDensity.compact,
|
||||||
visualDensity: VisualDensity.compact,
|
icon: StreamSvgIcon.closeSmall(),
|
||||||
icon: StreamSvgIcon.closeSmall(),
|
onPressed: widget.onQuotedMessageCleared,
|
||||||
onPressed: widget.onQuotedMessageCleared,
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: _buildTextField(context),
|
|
||||||
),
|
|
||||||
if (widget.parentMessage != null)
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: _buildDmCheckbox(),
|
child: _buildTextField(context),
|
||||||
),
|
),
|
||||||
_buildFilePickerSection(),
|
if (widget.parentMessage != null)
|
||||||
],
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
|
child: _buildDmCheckbox(),
|
||||||
|
),
|
||||||
|
_buildFilePickerSection(),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if (widget.editMessage == null) {
|
if (widget.editMessage == null) {
|
||||||
child = Material(
|
child = Material(
|
||||||
color: StreamChatTheme.of(context).colorTheme.white,
|
|
||||||
elevation: 8,
|
elevation: 8,
|
||||||
child: child,
|
child: child,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -885,7 +885,7 @@ class _MessageListViewState extends State<MessageListView> {
|
|||||||
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
showInChannelIndicator: showInChannelIndicator,
|
showInChannelIndicator: showInChannelIndicator,
|
||||||
showThreadReplyIndicator: showThreadReplyIndicator,
|
showThreadReplyIndicator: showThreadReplyIndicator,
|
||||||
showUsername: showUsername,
|
showUsername: true,
|
||||||
showTimestamp: showTimeStamp,
|
showTimestamp: showTimeStamp,
|
||||||
showSendingIndicator: showSendingIndicator,
|
showSendingIndicator: showSendingIndicator,
|
||||||
showUserAvatar: showUserAvatar,
|
showUserAvatar: showUserAvatar,
|
||||||
|
|||||||
@@ -578,9 +578,7 @@ class _MessageWidgetState extends State<MessageWidget>
|
|||||||
if (showUsername)
|
if (showUsername)
|
||||||
Text(
|
Text(
|
||||||
widget.message.user.name,
|
widget.message.user.name,
|
||||||
style: widget.messageTheme.replies.copyWith(
|
style: widget.messageTheme.messageAuthor,
|
||||||
color: widget.messageTheme.createdAt.color,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
if (showTimeStamp)
|
if (showTimeStamp)
|
||||||
Text(
|
Text(
|
||||||
|
|||||||
@@ -206,6 +206,7 @@ class StreamChatThemeData {
|
|||||||
inputBackground: colorTheme.white.withAlpha(12),
|
inputBackground: colorTheme.white.withAlpha(12),
|
||||||
),
|
),
|
||||||
ownMessageTheme: MessageTheme(
|
ownMessageTheme: MessageTheme(
|
||||||
|
messageAuthor: textTheme.footnote.copyWith(color: colorTheme.grey),
|
||||||
messageText: textTheme.body,
|
messageText: textTheme.body,
|
||||||
createdAt: textTheme.footnote.copyWith(color: colorTheme.grey),
|
createdAt: textTheme.footnote.copyWith(color: colorTheme.grey),
|
||||||
replies: textTheme.footnoteBold.copyWith(color: accentColor),
|
replies: textTheme.footnoteBold.copyWith(color: accentColor),
|
||||||
@@ -231,6 +232,7 @@ class StreamChatThemeData {
|
|||||||
reactionsMaskColor: colorTheme.whiteSnow,
|
reactionsMaskColor: colorTheme.whiteSnow,
|
||||||
messageText: textTheme.body,
|
messageText: textTheme.body,
|
||||||
createdAt: textTheme.footnote.copyWith(color: colorTheme.grey),
|
createdAt: textTheme.footnote.copyWith(color: colorTheme.grey),
|
||||||
|
messageAuthor: textTheme.footnote.copyWith(color: colorTheme.grey),
|
||||||
replies: textTheme.footnoteBold.copyWith(color: accentColor),
|
replies: textTheme.footnoteBold.copyWith(color: accentColor),
|
||||||
messageLinks: TextStyle(
|
messageLinks: TextStyle(
|
||||||
color: accentColor,
|
color: accentColor,
|
||||||
|
|||||||
Reference in New Issue
Block a user