fix dark ui messages
This commit is contained in:
@@ -283,6 +283,10 @@ class _ChannelListViewState extends State<ChannelListView>
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
final backgroundColor =
|
||||||
|
Theme.of(context).brightness == Brightness.light
|
||||||
|
? Color(0xffEBEBEB)
|
||||||
|
: Color(0xff141414);
|
||||||
child = Slidable(
|
child = Slidable(
|
||||||
enabled: widget.swipeToAction,
|
enabled: widget.swipeToAction,
|
||||||
actionPane: SlidableBehindActionPane(),
|
actionPane: SlidableBehindActionPane(),
|
||||||
@@ -290,7 +294,7 @@ class _ChannelListViewState extends State<ChannelListView>
|
|||||||
closeOnScroll: true,
|
closeOnScroll: true,
|
||||||
secondaryActions: <Widget>[
|
secondaryActions: <Widget>[
|
||||||
IconSlideAction(
|
IconSlideAction(
|
||||||
color: Color(0xffEBEBEB),
|
color: backgroundColor,
|
||||||
icon: Icons.more_horiz,
|
icon: Icons.more_horiz,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
@@ -309,7 +313,7 @@ class _ChannelListViewState extends State<ChannelListView>
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
IconSlideAction(
|
IconSlideAction(
|
||||||
color: Color(0xffEBEBEB),
|
color: backgroundColor,
|
||||||
icon: LineAwesomeIcons.volume_off,
|
icon: LineAwesomeIcons.volume_off,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
if (!channel.isMuted) {
|
if (!channel.isMuted) {
|
||||||
@@ -321,10 +325,12 @@ class _ChannelListViewState extends State<ChannelListView>
|
|||||||
),
|
),
|
||||||
if (channel.isGroup && !channel.isDistinct)
|
if (channel.isGroup && !channel.isDistinct)
|
||||||
IconSlideAction(
|
IconSlideAction(
|
||||||
color: Color(0xffEBEBEB),
|
color: backgroundColor,
|
||||||
iconWidget: SvgPicture.asset(
|
iconWidget: SvgPicture.asset(
|
||||||
'assets/icon_user_minus.svg',
|
'assets/icon_user_minus.svg',
|
||||||
package: 'stream_chat_flutter',
|
package: 'stream_chat_flutter',
|
||||||
|
color:
|
||||||
|
StreamChatTheme.of(context).primaryIconTheme.color,
|
||||||
width: 22,
|
width: 22,
|
||||||
),
|
),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
@@ -343,7 +349,7 @@ class _ChannelListViewState extends State<ChannelListView>
|
|||||||
),
|
),
|
||||||
if (!channel.isGroup && !channel.isDistinct)
|
if (!channel.isGroup && !channel.isDistinct)
|
||||||
IconSlideAction(
|
IconSlideAction(
|
||||||
color: Color(0xffEBEBEB),
|
color: backgroundColor,
|
||||||
icon: Icons.delete_outline,
|
icon: Icons.delete_outline,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final confirm = await showConfirmationDialog(
|
final confirm = await showConfirmationDialog(
|
||||||
|
|||||||
@@ -39,7 +39,10 @@ class DateDivider extends StatelessWidget {
|
|||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.black.withOpacity(0.5),
|
color: (Theme.of(context).brightness == Brightness.light
|
||||||
|
? Colors.black
|
||||||
|
: Colors.white)
|
||||||
|
.withOpacity(0.5),
|
||||||
borderRadius: BorderRadius.circular(
|
borderRadius: BorderRadius.circular(
|
||||||
8,
|
8,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ class StreamChatThemeData {
|
|||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
),
|
),
|
||||||
messageBackgroundColor: Color(0xffE6E6E6),
|
messageBackgroundColor: isDark ? Color(0xff191919) : Color(0xffE6E6E6),
|
||||||
avatarTheme: AvatarTheme(
|
avatarTheme: AvatarTheme(
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
constraints: BoxConstraints.tightFor(
|
constraints: BoxConstraints.tightFor(
|
||||||
|
|||||||
Reference in New Issue
Block a user