Merge pull request #515 from GetStream/feat/colorNames

feat: color names [CDS-324]
This commit is contained in:
Salvatore Giordano
2021-07-01 09:09:24 +02:00
committed by GitHub
46 changed files with 379 additions and 355 deletions
@@ -101,12 +101,12 @@ class ChannelListPage extends StatelessWidget {
StreamChatTheme.of(context).channelPreviewTheme.title!.copyWith( StreamChatTheme.of(context).channelPreviewTheme.title!.copyWith(
color: StreamChatTheme.of(context) color: StreamChatTheme.of(context)
.colorTheme .colorTheme
.black .textHighEmphasis
.withOpacity(opacity), .withOpacity(opacity),
), ),
), ),
subtitle: Text(subtitle), subtitle: Text(subtitle),
trailing: channel.state!.unreadCount! > 0 trailing: channel.state!.unreadCount > 0
? CircleAvatar( ? CircleAvatar(
radius: 10, radius: 10,
child: Text(channel.state!.unreadCount.toString()), child: Text(channel.state!.unreadCount.toString()),
@@ -50,9 +50,9 @@ class MyApp extends StatelessWidget {
), ),
), ),
otherMessageTheme: MessageTheme( otherMessageTheme: MessageTheme(
messageBackgroundColor: colorTheme.black, messageBackgroundColor: colorTheme.textHighEmphasis,
messageText: TextStyle( messageText: TextStyle(
color: colorTheme.white, color: colorTheme.barsBg,
), ),
avatarTheme: AvatarTheme( avatarTheme: AvatarTheme(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
@@ -35,7 +35,7 @@ class AttachmentTitle extends StatelessWidget {
attachment.title!, attachment.title!,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: messageTheme.messageText?.copyWith( style: messageTheme.messageText?.copyWith(
color: StreamChatTheme.of(context).colorTheme.accentBlue, color: StreamChatTheme.of(context).colorTheme.accentPrimary,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
@@ -129,7 +129,7 @@ class _PreparingState extends StatelessWidget {
alignment: Alignment.topRight, alignment: Alignment.topRight,
child: _IconButton( child: _IconButton(
icon: StreamSvgIcon.close( icon: StreamSvgIcon.close(
color: StreamChatTheme.of(context).colorTheme.white, color: StreamChatTheme.of(context).colorTheme.barsBg,
), ),
onPressed: () => channel.cancelAttachmentUpload(attachmentId), onPressed: () => channel.cancelAttachmentUpload(attachmentId),
), ),
@@ -169,7 +169,7 @@ class _InProgressState extends StatelessWidget {
alignment: Alignment.topRight, alignment: Alignment.topRight,
child: _IconButton( child: _IconButton(
icon: StreamSvgIcon.close( icon: StreamSvgIcon.close(
color: StreamChatTheme.of(context).colorTheme.white, color: StreamChatTheme.of(context).colorTheme.barsBg,
), ),
onPressed: () => channel.cancelAttachmentUpload(attachmentId), onPressed: () => channel.cancelAttachmentUpload(attachmentId),
), ),
@@ -208,7 +208,7 @@ class _FailedState extends StatelessWidget {
children: [ children: [
_IconButton( _IconButton(
icon: StreamSvgIcon.retry( icon: StreamSvgIcon.retry(
color: theme.colorTheme.white, color: theme.colorTheme.barsBg,
), ),
onPressed: () { onPressed: () {
channel.retryAttachmentUpload(messageId, attachmentId); channel.retryAttachmentUpload(messageId, attachmentId);
@@ -228,7 +228,7 @@ class _FailedState extends StatelessWidget {
child: Text( child: Text(
'UPLOAD ERROR', 'UPLOAD ERROR',
style: theme.textTheme.footnote.copyWith( style: theme.textTheme.footnote.copyWith(
color: theme.colorTheme.white, color: theme.colorTheme.barsBg,
), ),
), ),
), ),
@@ -247,7 +247,7 @@ class _SuccessState extends StatelessWidget {
backgroundColor: StreamChatTheme.of(context).colorTheme.overlayDark, backgroundColor: StreamChatTheme.of(context).colorTheme.overlayDark,
maxRadius: 12, maxRadius: 12,
child: StreamSvgIcon.check( child: StreamSvgIcon.check(
color: StreamChatTheme.of(context).colorTheme.white, color: StreamChatTheme.of(context).colorTheme.barsBg,
), ),
), ),
); );
@@ -75,12 +75,14 @@ class AttachmentError extends StatelessWidget {
child: Container( child: Container(
width: size?.width, width: size?.width,
height: size?.height, height: size?.height,
color: color: StreamChatTheme.of(context)
StreamChatTheme.of(context).colorTheme.accentRed.withOpacity(.1), .colorTheme
.accentError
.withOpacity(.1),
child: Center( child: Center(
child: Icon( child: Icon(
Icons.error_outline, Icons.error_outline,
color: StreamChatTheme.of(context).colorTheme.black, color: StreamChatTheme.of(context).colorTheme.textHighEmphasis,
), ),
), ),
), ),
@@ -54,10 +54,10 @@ class FileAttachment extends AttachmentWidget {
width: size?.width ?? 100, width: size?.width ?? 100,
height: 56, height: 56,
decoration: BoxDecoration( decoration: BoxDecoration(
color: colorTheme.white, color: colorTheme.barsBg,
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
border: Border.all( border: Border.all(
color: colorTheme.greyWhisper, color: colorTheme.borders,
), ),
), ),
child: Row( child: Row(
@@ -141,8 +141,8 @@ class FileAttachment extends AttachmentWidget {
final colorTheme = StreamChatTheme.of(context).colorTheme; final colorTheme = StreamChatTheme.of(context).colorTheme;
return Shimmer.fromColors( return Shimmer.fromColors(
baseColor: colorTheme.greyGainsboro, baseColor: colorTheme.disabled,
highlightColor: colorTheme.whiteSmoke, highlightColor: colorTheme.inputBg,
child: image, child: image,
); );
}, },
@@ -217,7 +217,7 @@ class FileAttachment extends AttachmentWidget {
preparing: () => Padding( preparing: () => Padding(
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
child: _buildButton( child: _buildButton(
icon: StreamSvgIcon.close(color: theme.colorTheme.white), icon: StreamSvgIcon.close(color: theme.colorTheme.barsBg),
fillColor: theme.colorTheme.overlayDark, fillColor: theme.colorTheme.overlayDark,
onPressed: () => channel.cancelAttachmentUpload(attachmentId), onPressed: () => channel.cancelAttachmentUpload(attachmentId),
), ),
@@ -225,7 +225,7 @@ class FileAttachment extends AttachmentWidget {
inProgress: (_, __) => Padding( inProgress: (_, __) => Padding(
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
child: _buildButton( child: _buildButton(
icon: StreamSvgIcon.close(color: theme.colorTheme.white), icon: StreamSvgIcon.close(color: theme.colorTheme.barsBg),
fillColor: theme.colorTheme.overlayDark, fillColor: theme.colorTheme.overlayDark,
onPressed: () => channel.cancelAttachmentUpload(attachmentId), onPressed: () => channel.cancelAttachmentUpload(attachmentId),
), ),
@@ -233,15 +233,15 @@ class FileAttachment extends AttachmentWidget {
success: () => Padding( success: () => Padding(
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
child: CircleAvatar( child: CircleAvatar(
backgroundColor: theme.colorTheme.accentBlue, backgroundColor: theme.colorTheme.accentPrimary,
maxRadius: 12, maxRadius: 12,
child: StreamSvgIcon.check(color: theme.colorTheme.white), child: StreamSvgIcon.check(color: theme.colorTheme.barsBg),
), ),
), ),
failed: (_) => Padding( failed: (_) => Padding(
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
child: _buildButton( child: _buildButton(
icon: StreamSvgIcon.retry(color: theme.colorTheme.white), icon: StreamSvgIcon.retry(color: theme.colorTheme.barsBg),
fillColor: theme.colorTheme.overlayDark, fillColor: theme.colorTheme.overlayDark,
onPressed: () => channel.retryAttachmentUpload( onPressed: () => channel.retryAttachmentUpload(
message.id, message.id,
@@ -253,7 +253,8 @@ class FileAttachment extends AttachmentWidget {
if (message.status == MessageSendingStatus.sent) { if (message.status == MessageSendingStatus.sent) {
trailingWidget = IconButton( trailingWidget = IconButton(
icon: StreamSvgIcon.cloudDownload(color: theme.colorTheme.black), icon: StreamSvgIcon.cloudDownload(
color: theme.colorTheme.textHighEmphasis),
visualDensity: VisualDensity.compact, visualDensity: VisualDensity.compact,
splashRadius: 16, splashRadius: 16,
onPressed: () { onPressed: () {
@@ -272,7 +273,7 @@ class FileAttachment extends AttachmentWidget {
final theme = StreamChatTheme.of(context); final theme = StreamChatTheme.of(context);
final size = attachment.file?.size ?? attachment.extraData['file_size']; final size = attachment.file?.size ?? attachment.extraData['file_size'];
final textStyle = theme.textTheme.footnote.copyWith( final textStyle = theme.textTheme.footnote.copyWith(
color: theme.colorTheme.grey, color: theme.colorTheme.textLowEmphasis,
); );
return attachment.uploadState.when( return attachment.uploadState.when(
preparing: () => Text(fileSize(size), style: textStyle), preparing: () => Text(fileSize(size), style: textStyle),
@@ -282,7 +283,7 @@ class FileAttachment extends AttachmentWidget {
showBackground: false, showBackground: false,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
textStyle: textStyle, textStyle: textStyle,
progressIndicatorColor: theme.colorTheme.accentBlue, progressIndicatorColor: theme.colorTheme.accentPrimary,
), ),
success: () => Text(fileSize(size), style: textStyle), success: () => Text(fileSize(size), style: textStyle),
failed: (_) => Text('UPLOAD ERROR', style: textStyle), failed: (_) => Text('UPLOAD ERROR', style: textStyle),
@@ -51,7 +51,7 @@ class GiphyAttachment extends AttachmentWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Card( Card(
color: StreamChatTheme.of(context).colorTheme.white, color: StreamChatTheme.of(context).colorTheme.barsBg,
elevation: 2, elevation: 2,
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
shape: const RoundedRectangleBorder( shape: const RoundedRectangleBorder(
@@ -83,7 +83,7 @@ class GiphyAttachment extends AttachmentWidget {
style: TextStyle( style: TextStyle(
color: StreamChatTheme.of(context) color: StreamChatTheme.of(context)
.colorTheme .colorTheme
.black .textHighEmphasis
.withOpacity(0.5), .withOpacity(0.5),
), ),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
@@ -117,7 +117,7 @@ class GiphyAttachment extends AttachmentWidget {
Container( Container(
color: StreamChatTheme.of(context) color: StreamChatTheme.of(context)
.colorTheme .colorTheme
.black .textHighEmphasis
.withOpacity(0.2), .withOpacity(0.2),
width: double.infinity, width: double.infinity,
height: 0.5, height: 0.5,
@@ -141,7 +141,7 @@ class GiphyAttachment extends AttachmentWidget {
.copyWith( .copyWith(
color: StreamChatTheme.of(context) color: StreamChatTheme.of(context)
.colorTheme .colorTheme
.black .textHighEmphasis
.withOpacity(0.5), .withOpacity(0.5),
), ),
), ),
@@ -152,7 +152,7 @@ class GiphyAttachment extends AttachmentWidget {
width: 0.5, width: 0.5,
color: StreamChatTheme.of(context) color: StreamChatTheme.of(context)
.colorTheme .colorTheme
.black .textHighEmphasis
.withOpacity(0.2), .withOpacity(0.2),
height: 50, height: 50,
), ),
@@ -173,7 +173,7 @@ class GiphyAttachment extends AttachmentWidget {
.copyWith( .copyWith(
color: StreamChatTheme.of(context) color: StreamChatTheme.of(context)
.colorTheme .colorTheme
.black .textHighEmphasis
.withOpacity(0.5), .withOpacity(0.5),
), ),
maxLines: 1, maxLines: 1,
@@ -185,7 +185,7 @@ class GiphyAttachment extends AttachmentWidget {
width: 0.5, width: 0.5,
color: StreamChatTheme.of(context) color: StreamChatTheme.of(context)
.colorTheme .colorTheme
.black .textHighEmphasis
.withOpacity(0.2), .withOpacity(0.2),
height: 50, height: 50,
), ),
@@ -203,7 +203,7 @@ class GiphyAttachment extends AttachmentWidget {
style: TextStyle( style: TextStyle(
color: StreamChatTheme.of(context) color: StreamChatTheme.of(context)
.colorTheme .colorTheme
.accentBlue, .accentPrimary,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
@@ -226,7 +226,7 @@ class GiphyAttachment extends AttachmentWidget {
StreamSvgIcon.eye( StreamSvgIcon.eye(
color: StreamChatTheme.of(context) color: StreamChatTheme.of(context)
.colorTheme .colorTheme
.black .textHighEmphasis
.withOpacity(0.5), .withOpacity(0.5),
size: 16, size: 16,
), ),
@@ -241,7 +241,7 @@ class GiphyAttachment extends AttachmentWidget {
.copyWith( .copyWith(
color: StreamChatTheme.of(context) color: StreamChatTheme.of(context)
.colorTheme .colorTheme
.black .textHighEmphasis
.withOpacity(0.5)), .withOpacity(0.5)),
), ),
], ],
@@ -306,8 +306,8 @@ class GiphyAttachment extends AttachmentWidget {
final colorTheme = StreamChatTheme.of(context).colorTheme; final colorTheme = StreamChatTheme.of(context).colorTheme;
return Shimmer.fromColors( return Shimmer.fromColors(
baseColor: colorTheme.greyGainsboro, baseColor: colorTheme.disabled,
highlightColor: colorTheme.whiteSmoke, highlightColor: colorTheme.inputBg,
child: image, child: image,
); );
}, },
@@ -322,7 +322,7 @@ class GiphyAttachment extends AttachmentWidget {
child: Material( child: Material(
color: StreamChatTheme.of(context) color: StreamChatTheme.of(context)
.colorTheme .colorTheme
.black .textHighEmphasis
.withOpacity(.5), .withOpacity(.5),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
@@ -335,13 +335,14 @@ class GiphyAttachment extends AttachmentWidget {
child: Row( child: Row(
children: [ children: [
StreamSvgIcon.lightning( StreamSvgIcon.lightning(
color: StreamChatTheme.of(context).colorTheme.white, color: StreamChatTheme.of(context).colorTheme.barsBg,
size: 16, size: 16,
), ),
Text( Text(
'GIPHY', 'GIPHY',
style: TextStyle( style: TextStyle(
color: StreamChatTheme.of(context).colorTheme.white, color:
StreamChatTheme.of(context).colorTheme.barsBg,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 11, fontSize: 11,
), ),
@@ -103,8 +103,8 @@ class ImageAttachment extends AttachmentWidget {
); );
final colorTheme = StreamChatTheme.of(context).colorTheme; final colorTheme = StreamChatTheme.of(context).colorTheme;
return Shimmer.fromColors( return Shimmer.fromColors(
baseColor: colorTheme.greyGainsboro, baseColor: colorTheme.disabled,
highlightColor: colorTheme.whiteSmoke, highlightColor: colorTheme.inputBg,
child: image, child: image,
); );
}, },
@@ -72,7 +72,7 @@ class AttachmentActionsModal extends StatelessWidget {
'Reply', 'Reply',
StreamSvgIcon.iconCurveLineLeftUp( StreamSvgIcon.iconCurveLineLeftUp(
size: 24, size: 24,
color: theme.colorTheme.grey, color: theme.colorTheme.textLowEmphasis,
), ),
() { () {
Navigator.pop(context, ReturnActionType.reply); Navigator.pop(context, ReturnActionType.reply);
@@ -83,7 +83,7 @@ class AttachmentActionsModal extends StatelessWidget {
'Show in Chat', 'Show in Chat',
StreamSvgIcon.eye( StreamSvgIcon.eye(
size: 24, size: 24,
color: theme.colorTheme.black, color: theme.colorTheme.textHighEmphasis,
), ),
onShowMessage, onShowMessage,
), ),
@@ -93,7 +93,7 @@ class AttachmentActionsModal extends StatelessWidget {
'Save ${message.attachments[currentIndex].type == 'video' ? 'Video' : 'Image'}', 'Save ${message.attachments[currentIndex].type == 'video' ? 'Video' : 'Image'}',
StreamSvgIcon.iconSave( StreamSvgIcon.iconSave(
size: 24, size: 24,
color: theme.colorTheme.grey, color: theme.colorTheme.textLowEmphasis,
), ),
() { () {
final attachment = message.attachments[currentIndex]; final attachment = message.attachments[currentIndex];
@@ -144,7 +144,7 @@ class AttachmentActionsModal extends StatelessWidget {
'Delete', 'Delete',
StreamSvgIcon.delete( StreamSvgIcon.delete(
size: 24, size: 24,
color: theme.colorTheme.accentRed, color: theme.colorTheme.accentError,
), ),
() { () {
final channel = StreamChannel.of(context).channel; final channel = StreamChannel.of(context).channel;
@@ -165,7 +165,7 @@ class AttachmentActionsModal extends StatelessWidget {
..maybePop(); ..maybePop();
} }
}, },
color: theme.colorTheme.accentRed, color: theme.colorTheme.accentError,
), ),
] ]
.map<Widget>((e) => Align( .map<Widget>((e) => Align(
@@ -175,7 +175,7 @@ class AttachmentActionsModal extends StatelessWidget {
.insertBetween( .insertBetween(
Container( Container(
height: 1, height: 1,
color: theme.colorTheme.greyWhisper, color: theme.colorTheme.borders,
), ),
), ),
), ),
@@ -196,7 +196,7 @@ class AttachmentActionsModal extends StatelessWidget {
}) => }) =>
Material( Material(
key: key, key: key,
color: StreamChatTheme.of(context).colorTheme.white, color: StreamChatTheme.of(context).colorTheme.barsBg,
child: InkWell( child: InkWell(
onTap: onTap, onTap: onTap,
child: Padding( child: Padding(
@@ -241,7 +241,7 @@ class AttachmentActionsModal extends StatelessWidget {
width: 182, width: 182,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.circular(16),
color: theme.colorTheme.white, color: theme.colorTheme.barsBg,
), ),
child: Center( child: Center(
child: progress == null child: progress == null
@@ -249,7 +249,7 @@ class AttachmentActionsModal extends StatelessWidget {
height: 100, height: 100,
width: 100, width: 100,
child: StreamSvgIcon.error( child: StreamSvgIcon.error(
color: theme.colorTheme.greyGainsboro, color: theme.colorTheme.disabled,
), ),
) )
: progress.toProgressIndicatorValue == 1.0 : progress.toProgressIndicatorValue == 1.0
@@ -258,7 +258,7 @@ class AttachmentActionsModal extends StatelessWidget {
height: 160, height: 160,
width: 160, width: 160,
child: StreamSvgIcon.check( child: StreamSvgIcon.check(
color: theme.colorTheme.greyGainsboro, color: theme.colorTheme.disabled,
), ),
) )
: SizedBox( : SizedBox(
@@ -271,14 +271,14 @@ class AttachmentActionsModal extends StatelessWidget {
value: progress.toProgressIndicatorValue, value: progress.toProgressIndicatorValue,
strokeWidth: 8, strokeWidth: 8,
valueColor: AlwaysStoppedAnimation( valueColor: AlwaysStoppedAnimation(
theme.colorTheme.accentBlue, theme.colorTheme.accentPrimary,
), ),
), ),
Center( Center(
child: Text( child: Text(
'${progress.toPercentage}%', '${progress.toPercentage}%',
style: theme.textTheme.headline.copyWith( style: theme.textTheme.headline.copyWith(
color: theme.colorTheme.grey, color: theme.colorTheme.textLowEmphasis,
), ),
), ),
), ),
@@ -44,7 +44,7 @@ class StreamBackButton extends StatelessWidget {
padding: const EdgeInsets.all(14), padding: const EdgeInsets.all(14),
child: StreamSvgIcon.left( child: StreamSvgIcon.left(
size: 24, size: 24,
color: StreamChatTheme.of(context).colorTheme.black, color: StreamChatTheme.of(context).colorTheme.textHighEmphasis,
), ),
), ),
if (showUnreads) if (showUnreads)
@@ -32,7 +32,7 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
final isOwner = userAsMember.role == 'owner'; final isOwner = userAsMember.role == 'owner';
return Material( return Material(
color: _streamChatThemeData.colorTheme.white, color: _streamChatThemeData.colorTheme.barsBg,
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
shape: const RoundedRectangleBorder( shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@@ -146,7 +146,7 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
leading: Padding( leading: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16), padding: const EdgeInsets.symmetric(horizontal: 16),
child: StreamSvgIcon.user( child: StreamSvgIcon.user(
color: _streamChatThemeData.colorTheme.grey, color: _streamChatThemeData.colorTheme.textLowEmphasis,
), ),
), ),
title: 'View Info', title: 'View Info',
@@ -157,7 +157,7 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
leading: Padding( leading: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16), padding: const EdgeInsets.symmetric(horizontal: 16),
child: StreamSvgIcon.userRemove( child: StreamSvgIcon.userRemove(
color: _streamChatThemeData.colorTheme.grey, color: _streamChatThemeData.colorTheme.textLowEmphasis,
), ),
), ),
title: 'Leave Group', title: 'Leave Group',
@@ -176,11 +176,11 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
leading: Padding( leading: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16), padding: const EdgeInsets.symmetric(horizontal: 16),
child: StreamSvgIcon.delete( child: StreamSvgIcon.delete(
color: _streamChatThemeData.colorTheme.accentRed, color: _streamChatThemeData.colorTheme.accentError,
), ),
), ),
title: 'Delete Conversation', title: 'Delete Conversation',
titleColor: _streamChatThemeData.colorTheme.accentRed, titleColor: _streamChatThemeData.colorTheme.accentError,
onTap: () async { onTap: () async {
setState(() { setState(() {
_showActions = false; _showActions = false;
@@ -195,7 +195,7 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
leading: Padding( leading: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16), padding: const EdgeInsets.symmetric(horizontal: 16),
child: StreamSvgIcon.closeSmall( child: StreamSvgIcon.closeSmall(
color: _streamChatThemeData.colorTheme.grey, color: _streamChatThemeData.colorTheme.textLowEmphasis,
), ),
), ),
title: 'Cancel', title: 'Cancel',
@@ -224,7 +224,7 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
question: 'Are you sure you want to delete this conversation?', question: 'Are you sure you want to delete this conversation?',
cancelText: 'CANCEL', cancelText: 'CANCEL',
icon: StreamSvgIcon.delete( icon: StreamSvgIcon.delete(
color: _streamChatThemeData.colorTheme.accentRed, color: _streamChatThemeData.colorTheme.accentError,
), ),
); );
final channel = _streamChannelState.channel; final channel = _streamChannelState.channel;
@@ -242,7 +242,7 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
question: 'Are you sure you want to leave this conversation?', question: 'Are you sure you want to leave this conversation?',
cancelText: 'CANCEL', cancelText: 'CANCEL',
icon: StreamSvgIcon.userRemove( icon: StreamSvgIcon.userRemove(
color: _streamChatThemeData.colorTheme.accentRed, color: _streamChatThemeData.colorTheme.accentError,
), ),
); );
if (res == true) { if (res == true) {
@@ -110,8 +110,8 @@ class ChannelImage extends StatelessWidget {
.channelPreviewTheme.avatarTheme?.constraints, .channelPreviewTheme.avatarTheme?.constraints,
onTap: onTap != null ? (_) => onTap!() : null, onTap: onTap != null ? (_) => onTap!() : null,
selected: selected, selected: selected,
selectionColor: selectionColor: selectionColor ??
selectionColor ?? chatThemeData.colorTheme.accentBlue, chatThemeData.colorTheme.accentPrimary,
selectionThickness: selectionThickness, selectionThickness: selectionThickness,
)); ));
} else { } else {
@@ -132,7 +132,7 @@ class ChannelImage extends StatelessWidget {
onTap: onTap, onTap: onTap,
selected: selected, selected: selected,
selectionColor: selectionColor:
selectionColor ?? chatThemeData.colorTheme.accentBlue, selectionColor ?? chatThemeData.colorTheme.accentPrimary,
selectionThickness: selectionThickness, selectionThickness: selectionThickness,
); );
} }
@@ -144,7 +144,7 @@ class ChannelImage extends StatelessWidget {
constraints: constraints ?? constraints: constraints ??
chatThemeData.channelPreviewTheme.avatarTheme?.constraints, chatThemeData.channelPreviewTheme.avatarTheme?.constraints,
decoration: BoxDecoration( decoration: BoxDecoration(
color: chatThemeData.colorTheme.accentBlue, color: chatThemeData.colorTheme.accentPrimary,
), ),
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
@@ -157,7 +157,7 @@ class ChannelImage extends StatelessWidget {
child: Text( child: Text(
data.containsKey('name') ? data['name'][0] : '', data.containsKey('name') ? data['name'][0] : '',
style: TextStyle( style: TextStyle(
color: chatThemeData.colorTheme.white, color: chatThemeData.colorTheme.barsBg,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
@@ -189,7 +189,7 @@ class ChannelImage extends StatelessWidget {
child: Container( child: Container(
constraints: constraints ?? constraints: constraints ??
chatThemeData.ownMessageTheme.avatarTheme?.constraints, chatThemeData.ownMessageTheme.avatarTheme?.constraints,
color: selectionColor ?? chatThemeData.colorTheme.accentBlue, color: selectionColor ?? chatThemeData.colorTheme.accentPrimary,
child: Padding( child: Padding(
padding: EdgeInsets.all(selectionThickness), padding: EdgeInsets.all(selectionThickness),
child: child, child: child,
@@ -143,7 +143,7 @@ class ChannelInfo extends StatelessWidget {
child: Text( child: Text(
'Try Again', 'Try Again',
style: textStyle?.copyWith( style: textStyle?.copyWith(
color: StreamChatTheme.of(context).colorTheme.accentBlue, color: StreamChatTheme.of(context).colorTheme.accentPrimary,
), ),
), ),
), ),
@@ -154,7 +154,7 @@ class ChannelListHeader extends StatelessWidget implements PreferredSizeWidget {
Color? color; Color? color;
switch (status) { switch (status) {
case ConnectionStatus.connected: case ConnectionStatus.connected:
color = chatThemeData.colorTheme.accentBlue; color = chatThemeData.colorTheme.accentPrimary;
break; break;
case ConnectionStatus.connecting: case ConnectionStatus.connecting:
color = Colors.grey; color = Colors.grey;
@@ -209,7 +209,7 @@ class ChannelListHeader extends StatelessWidget implements PreferredSizeWidget {
return Text( return Text(
'Stream Chat', 'Stream Chat',
style: chatThemeData.textTheme.headlineBold.copyWith( style: chatThemeData.textTheme.headlineBold.copyWith(
color: chatThemeData.colorTheme.black, color: chatThemeData.colorTheme.textHighEmphasis,
), ),
); );
} }
@@ -262,7 +262,7 @@ class ChannelListHeader extends StatelessWidget implements PreferredSizeWidget {
style: chatThemeData.channelListHeaderTheme.title?.copyWith( style: chatThemeData.channelListHeaderTheme.title?.copyWith(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: chatThemeData.colorTheme.accentBlue, color: chatThemeData.colorTheme.accentPrimary,
), ),
), ),
), ),
@@ -290,7 +290,7 @@ class _ChannelListViewState extends State<ChannelListView> {
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
child: StreamSvgIcon.message( child: StreamSvgIcon.message(
size: 136, size: 136,
color: chatThemeData.colorTheme.greyGainsboro, color: chatThemeData.colorTheme.disabled,
), ),
), ),
Padding( Padding(
@@ -309,7 +309,7 @@ class _ChannelListViewState extends State<ChannelListView> {
'How about sending your first message to a friend?', 'How about sending your first message to a friend?',
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: chatThemeData.textTheme.body.copyWith( style: chatThemeData.textTheme.body.copyWith(
color: chatThemeData.colorTheme.grey, color: chatThemeData.colorTheme.textLowEmphasis,
), ),
), ),
), ),
@@ -327,7 +327,7 @@ class _ChannelListViewState extends State<ChannelListView> {
child: Text( child: Text(
'Start a chat', 'Start a chat',
style: chatThemeData.textTheme.bodyBold.copyWith( style: chatThemeData.textTheme.bodyBold.copyWith(
color: chatThemeData.colorTheme.accentBlue, color: chatThemeData.colorTheme.accentPrimary,
), ),
), ),
), ),
@@ -362,8 +362,8 @@ class _ChannelListViewState extends State<ChannelListView> {
final chatThemeData = StreamChatTheme.of(context); final chatThemeData = StreamChatTheme.of(context);
if (widget.crossAxisCount > 1) { if (widget.crossAxisCount > 1) {
return Shimmer.fromColors( return Shimmer.fromColors(
baseColor: chatThemeData.colorTheme.greyGainsboro, baseColor: chatThemeData.colorTheme.disabled,
highlightColor: chatThemeData.colorTheme.whiteSmoke, highlightColor: chatThemeData.colorTheme.inputBg,
child: Column( child: Column(
children: [ children: [
const SizedBox(height: 4), const SizedBox(height: 4),
@@ -391,12 +391,12 @@ class _ChannelListViewState extends State<ChannelListView> {
); );
} else { } else {
return Shimmer.fromColors( return Shimmer.fromColors(
baseColor: chatThemeData.colorTheme.greyGainsboro, baseColor: chatThemeData.colorTheme.disabled,
highlightColor: chatThemeData.colorTheme.whiteSmoke, highlightColor: chatThemeData.colorTheme.inputBg,
child: ListTile( child: ListTile(
leading: Container( leading: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: chatThemeData.colorTheme.white, color: chatThemeData.colorTheme.barsBg,
shape: BoxShape.circle, shape: BoxShape.circle,
), ),
constraints: const BoxConstraints.tightFor( constraints: const BoxConstraints.tightFor(
@@ -412,7 +412,7 @@ class _ChannelListViewState extends State<ChannelListView> {
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: chatThemeData.colorTheme.white, color: chatThemeData.colorTheme.barsBg,
borderRadius: BorderRadius.circular(11), borderRadius: BorderRadius.circular(11),
), ),
constraints: const BoxConstraints.tightFor( constraints: const BoxConstraints.tightFor(
@@ -429,7 +429,7 @@ class _ChannelListViewState extends State<ChannelListView> {
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: chatThemeData.colorTheme.white, color: chatThemeData.colorTheme.barsBg,
borderRadius: BorderRadius.circular(11), borderRadius: BorderRadius.circular(11),
), ),
constraints: const BoxConstraints.expand( constraints: const BoxConstraints.expand(
@@ -441,7 +441,7 @@ class _ChannelListViewState extends State<ChannelListView> {
Container( Container(
margin: const EdgeInsets.only(left: 16), margin: const EdgeInsets.only(left: 16),
decoration: BoxDecoration( decoration: BoxDecoration(
color: chatThemeData.colorTheme.white, color: chatThemeData.colorTheme.barsBg,
borderRadius: BorderRadius.circular(11), borderRadius: BorderRadius.circular(11),
), ),
constraints: const BoxConstraints.tightFor( constraints: const BoxConstraints.tightFor(
@@ -488,7 +488,7 @@ class _ChannelListViewState extends State<ChannelListView> {
final channelsBloc = ChannelsBloc.of(context); final channelsBloc = ChannelsBloc.of(context);
final onTap = _getChannelTap(context); final onTap = _getChannelTap(context);
final chatThemeData = StreamChatTheme.of(context); final chatThemeData = StreamChatTheme.of(context);
final backgroundColor = chatThemeData.colorTheme.whiteSmoke; final backgroundColor = chatThemeData.colorTheme.inputBg;
if (i < channels.length) { if (i < channels.length) {
final channel = channels[i]; final channel = channels[i];
@@ -549,7 +549,7 @@ class _ChannelListViewState extends State<ChannelListView> {
IconSlideAction( IconSlideAction(
color: backgroundColor, color: backgroundColor,
iconWidget: StreamSvgIcon.delete( iconWidget: StreamSvgIcon.delete(
color: chatThemeData.colorTheme.accentRed, color: chatThemeData.colorTheme.accentError,
), ),
onTap: widget.onDeletePressed != null onTap: widget.onDeletePressed != null
? () { ? () {
@@ -565,7 +565,7 @@ class _ChannelListViewState extends State<ChannelListView> {
'Are you sure you want to delete this conversation?', 'Are you sure you want to delete this conversation?',
cancelText: 'CANCEL', cancelText: 'CANCEL',
icon: StreamSvgIcon.delete( icon: StreamSvgIcon.delete(
color: chatThemeData.colorTheme.accentRed, color: chatThemeData.colorTheme.accentError,
), ),
); );
if (res == true) { if (res == true) {
@@ -576,7 +576,7 @@ class _ChannelListViewState extends State<ChannelListView> {
], ],
child: DecoratedBox( child: DecoratedBox(
decoration: BoxDecoration( decoration: BoxDecoration(
color: chatThemeData.colorTheme.whiteSnow, color: chatThemeData.colorTheme.appBg,
), ),
child: widget.channelPreviewBuilder?.call(context, channel) ?? child: widget.channelPreviewBuilder?.call(context, channel) ??
ChannelPreview( ChannelPreview(
@@ -664,7 +664,7 @@ class _ChannelListViewState extends State<ChannelListView> {
errorBuilder: (context, err) => Container( errorBuilder: (context, err) => Container(
color: StreamChatTheme.of(context) color: StreamChatTheme.of(context)
.colorTheme .colorTheme
.accentRed .accentError
.withOpacity(.2), .withOpacity(.2),
child: const Padding( child: const Padding(
padding: EdgeInsets.symmetric(vertical: 16), padding: EdgeInsets.symmetric(vertical: 16),
@@ -55,7 +55,7 @@ class DateDivider extends StatelessWidget {
child: Text( child: Text(
dayInfo, dayInfo,
style: chatThemeData.textTheme.footnote.copyWith( style: chatThemeData.textTheme.footnote.copyWith(
color: chatThemeData.colorTheme.white, color: chatThemeData.colorTheme.barsBg,
), ),
), ),
), ),
@@ -39,8 +39,8 @@ class DeletedMessage extends StatelessWidget {
side: borderSide ?? side: borderSide ??
BorderSide( BorderSide(
color: Theme.of(context).brightness == Brightness.dark color: Theme.of(context).brightness == Brightness.dark
? chatThemeData.colorTheme.white.withAlpha(24) ? chatThemeData.colorTheme.barsBg.withAlpha(24)
: chatThemeData.colorTheme.black.withAlpha(24), : chatThemeData.colorTheme.textHighEmphasis.withAlpha(24),
), ),
), ),
child: Padding( child: Padding(
@@ -51,7 +51,7 @@ class GroupImage extends StatelessWidget {
constraints: constraints ?? constraints: constraints ??
streamChatTheme.ownMessageTheme.avatarTheme?.constraints, streamChatTheme.ownMessageTheme.avatarTheme?.constraints,
decoration: BoxDecoration( decoration: BoxDecoration(
color: streamChatTheme.colorTheme.accentBlue, color: streamChatTheme.colorTheme.accentPrimary,
), ),
child: Flex( child: Flex(
direction: Axis.vertical, direction: Axis.vertical,
@@ -119,7 +119,7 @@ class GroupImage extends StatelessWidget {
BorderRadius.zero) + BorderRadius.zero) +
BorderRadius.circular(selectionThickness), BorderRadius.circular(selectionThickness),
child: Container( child: Container(
color: selectionColor ?? streamChatTheme.colorTheme.accentBlue, color: selectionColor ?? streamChatTheme.colorTheme.accentPrimary,
height: 64, height: 64,
width: 64, width: 64,
child: Padding( child: Padding(
@@ -88,7 +88,7 @@ class _ImageFooterState extends State<ImageFooter> {
context: context, context: context,
removeTop: true, removeTop: true,
child: BottomAppBar( child: BottomAppBar(
color: chatThemeData.colorTheme.white, color: chatThemeData.colorTheme.barsBg,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@@ -100,7 +100,7 @@ class _ImageFooterState extends State<ImageFooter> {
IconButton( IconButton(
icon: StreamSvgIcon.iconShare( icon: StreamSvgIcon.iconShare(
size: 24, size: 24,
color: chatThemeData.colorTheme.black, color: chatThemeData.colorTheme.textHighEmphasis,
), ),
onPressed: () async { onPressed: () async {
final attachment = final attachment =
@@ -144,7 +144,7 @@ class _ImageFooterState extends State<ImageFooter> {
), ),
IconButton( IconButton(
icon: StreamSvgIcon.iconGrid( icon: StreamSvgIcon.iconGrid(
color: chatThemeData.colorTheme.black, color: chatThemeData.colorTheme.textHighEmphasis,
), ),
onPressed: () => _showPhotosModal(context), onPressed: () => _showPhotosModal(context),
), ),
@@ -160,7 +160,7 @@ class _ImageFooterState extends State<ImageFooter> {
showModalBottomSheet( showModalBottomSheet(
context: context, context: context,
barrierColor: chatThemeData.colorTheme.overlay, barrierColor: chatThemeData.colorTheme.overlay,
backgroundColor: chatThemeData.colorTheme.white, backgroundColor: chatThemeData.colorTheme.barsBg,
isScrollControlled: true, isScrollControlled: true,
shape: const RoundedRectangleBorder( shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@@ -199,7 +199,7 @@ class _ImageFooterState extends State<ImageFooter> {
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: IconButton( child: IconButton(
icon: StreamSvgIcon.close( icon: StreamSvgIcon.close(
color: chatThemeData.colorTheme.black, color: chatThemeData.colorTheme.textHighEmphasis,
), ),
onPressed: () => Navigator.maybePop(context), onPressed: () => Navigator.maybePop(context),
), ),
@@ -262,7 +262,8 @@ class _ImageFooterState extends State<ImageFooter> {
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
blurRadius: 8, blurRadius: 8,
color: chatThemeData.colorTheme.black color: chatThemeData
.colorTheme.textHighEmphasis
.withOpacity(0.3), .withOpacity(0.3),
), ),
], ],
@@ -59,7 +59,7 @@ class ImageHeader extends StatelessWidget implements PreferredSizeWidget {
leading: showBackButton leading: showBackButton
? IconButton( ? IconButton(
icon: StreamSvgIcon.close( icon: StreamSvgIcon.close(
color: chatThemeData.colorTheme.black, color: chatThemeData.colorTheme.textHighEmphasis,
size: 24, size: 24,
), ),
onPressed: onBackPressed, onPressed: onBackPressed,
@@ -70,7 +70,7 @@ class ImageHeader extends StatelessWidget implements PreferredSizeWidget {
if (message.type != 'ephemeral') if (message.type != 'ephemeral')
IconButton( IconButton(
icon: StreamSvgIcon.iconMenuPoint( icon: StreamSvgIcon.iconMenuPoint(
color: chatThemeData.colorTheme.black, color: chatThemeData.colorTheme.textHighEmphasis,
), ),
onPressed: () { onPressed: () {
_showMessageActionModalBottomSheet(context); _showMessageActionModalBottomSheet(context);
@@ -46,8 +46,8 @@ class InfoTile extends StatelessWidget {
childAnchor: childAnchor ?? Alignment.bottomCenter, childAnchor: childAnchor ?? Alignment.bottomCenter,
portal: Container( portal: Container(
height: 25, height: 25,
color: color: backgroundColor ??
backgroundColor ?? chatThemeData.colorTheme.grey.withOpacity(0.9), chatThemeData.colorTheme.textLowEmphasis.withOpacity(0.9),
child: Center( child: Center(
child: Text( child: Text(
message, message,
@@ -90,8 +90,8 @@ class _MediaListViewState extends State<MediaListView> {
? 1.0 ? 1.0
: 0.0, : 0.0,
child: Container( child: Container(
color: color: chatThemeData.colorTheme.textHighEmphasis
chatThemeData.colorTheme.black.withOpacity(0.5), .withOpacity(0.5),
alignment: Alignment.topRight, alignment: Alignment.topRight,
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
top: 8, top: 8,
@@ -99,10 +99,11 @@ class _MediaListViewState extends State<MediaListView> {
), ),
child: CircleAvatar( child: CircleAvatar(
radius: 12, radius: 12,
backgroundColor: chatThemeData.colorTheme.white, backgroundColor: chatThemeData.colorTheme.barsBg,
child: StreamSvgIcon.check( child: StreamSvgIcon.check(
size: 24, size: 24,
color: chatThemeData.colorTheme.black, color:
chatThemeData.colorTheme.textHighEmphasis,
), ),
), ),
), ),
@@ -124,7 +125,7 @@ class _MediaListViewState extends State<MediaListView> {
child: Text( child: Text(
media.videoDuration.format(), media.videoDuration.format(),
style: TextStyle( style: TextStyle(
color: chatThemeData.colorTheme.white, color: chatThemeData.colorTheme.barsBg,
), ),
), ),
), ),
@@ -76,7 +76,7 @@ class MentionTile extends StatelessWidget {
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: chatThemeData.textTheme.footnoteBold.copyWith( style: chatThemeData.textTheme.footnoteBold.copyWith(
color: chatThemeData.colorTheme.grey, color: chatThemeData.colorTheme.textLowEmphasis,
), ),
), ),
], ],
@@ -90,7 +90,7 @@ class MentionTile extends StatelessWidget {
left: 8, left: 8,
), ),
child: StreamSvgIcon.mentions( child: StreamSvgIcon.mentions(
color: chatThemeData.colorTheme.accentBlue, color: chatThemeData.colorTheme.accentPrimary,
), ),
), ),
], ],
@@ -165,7 +165,7 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
child: SizedBox( child: SizedBox(
width: mediaQueryData.size.width * 0.75, width: mediaQueryData.size.width * 0.75,
child: Material( child: Material(
color: streamChatThemeData.colorTheme.whiteSnow, color: streamChatThemeData.colorTheme.appBg,
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.circular(16),
@@ -197,7 +197,7 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
].insertBetween( ].insertBetween(
Container( Container(
height: 1, height: 1,
color: streamChatThemeData.colorTheme.greyWhisper, color: streamChatThemeData.colorTheme.borders,
), ),
), ),
), ),
@@ -270,7 +270,7 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
context, context,
title: 'Flag Message', title: 'Flag Message',
icon: StreamSvgIcon.flag( icon: StreamSvgIcon.flag(
color: streamChatThemeData.colorTheme.accentRed, color: streamChatThemeData.colorTheme.accentError,
size: 24, size: 24,
), ),
question: question:
@@ -287,7 +287,7 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
await showInfoDialog( await showInfoDialog(
context, context,
icon: StreamSvgIcon.flag( icon: StreamSvgIcon.flag(
color: theme.colorTheme.accentRed, color: theme.colorTheme.accentError,
size: 24, size: 24,
), ),
details: 'The message has been reported to a moderator.', details: 'The message has been reported to a moderator.',
@@ -300,7 +300,7 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
await showInfoDialog( await showInfoDialog(
context, context,
icon: StreamSvgIcon.flag( icon: StreamSvgIcon.flag(
color: theme.colorTheme.accentRed, color: theme.colorTheme.accentError,
size: 24, size: 24,
), ),
details: 'The message has been reported to a moderator.', details: 'The message has been reported to a moderator.',
@@ -337,7 +337,7 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
context, context,
title: 'Delete message', title: 'Delete message',
icon: StreamSvgIcon.flag( icon: StreamSvgIcon.flag(
color: StreamChatTheme.of(context).colorTheme.accentRed, color: StreamChatTheme.of(context).colorTheme.accentError,
size: 24, size: 24,
), ),
question: 'Are you sure you want to permanently delete this\nmessage?', question: 'Are you sure you want to permanently delete this\nmessage?',
@@ -363,7 +363,7 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
showInfoDialog( showInfoDialog(
context, context,
icon: StreamSvgIcon.error( icon: StreamSvgIcon.error(
color: StreamChatTheme.of(context).colorTheme.accentRed, color: StreamChatTheme.of(context).colorTheme.accentError,
size: 24, size: 24,
), ),
details: 'The operation couldn\'t be completed.', details: 'The operation couldn\'t be completed.',
@@ -540,7 +540,7 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
child: Row( child: Row(
children: [ children: [
StreamSvgIcon.circleUp( StreamSvgIcon.circleUp(
color: streamChatThemeData.colorTheme.accentBlue, color: streamChatThemeData.colorTheme.accentPrimary,
), ),
const SizedBox(width: 16), const SizedBox(width: 16),
Text( Text(
@@ -585,7 +585,7 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
Padding( Padding(
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
child: StreamSvgIcon.edit( child: StreamSvgIcon.edit(
color: streamChatThemeData.colorTheme.greyGainsboro, color: streamChatThemeData.colorTheme.disabled,
), ),
), ),
const Text( const Text(
@@ -334,7 +334,7 @@ class MessageInputState extends State<MessageInput> {
Padding( Padding(
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
child: StreamSvgIcon.reply( child: StreamSvgIcon.reply(
color: _streamChatTheme.colorTheme.greyGainsboro, color: _streamChatTheme.colorTheme.disabled,
), ),
), ),
const Text( const Text(
@@ -401,7 +401,8 @@ class MessageInputState extends State<MessageInput> {
border: _sendAsDm border: _sendAsDm
? null ? null
: Border.all( : Border.all(
color: _streamChatTheme.colorTheme.black.withOpacity(.5), color: _streamChatTheme.colorTheme.textHighEmphasis
.withOpacity(.5),
width: 2, width: 2,
), ),
borderRadius: BorderRadius.circular(3), borderRadius: BorderRadius.circular(3),
@@ -410,8 +411,8 @@ class MessageInputState extends State<MessageInput> {
child: Material( child: Material(
borderRadius: BorderRadius.circular(3), borderRadius: BorderRadius.circular(3),
color: _sendAsDm color: _sendAsDm
? _streamChatTheme.colorTheme.accentBlue ? _streamChatTheme.colorTheme.accentPrimary
: _streamChatTheme.colorTheme.white, : _streamChatTheme.colorTheme.barsBg,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
@@ -426,7 +427,7 @@ class MessageInputState extends State<MessageInput> {
: CrossFadeState.showSecond, : CrossFadeState.showSecond,
firstChild: StreamSvgIcon.check( firstChild: StreamSvgIcon.check(
size: 16, size: 16,
color: _streamChatTheme.colorTheme.white, color: _streamChatTheme.colorTheme.barsBg,
), ),
secondChild: const SizedBox( secondChild: const SizedBox(
height: 16, height: 16,
@@ -442,7 +443,8 @@ class MessageInputState extends State<MessageInput> {
child: Text( child: Text(
'Also send as direct message', 'Also send as direct message',
style: _streamChatTheme.textTheme.footnote.copyWith( style: _streamChatTheme.textTheme.footnote.copyWith(
color: _streamChatTheme.colorTheme.black.withOpacity(0.5), color: _streamChatTheme.colorTheme.textHighEmphasis
.withOpacity(0.5),
), ),
), ),
), ),
@@ -582,7 +584,7 @@ class MessageInputState extends State<MessageInput> {
isDense: true, isDense: true,
hintText: _getHint(), hintText: _getHint(),
hintStyle: _streamChatTheme.messageInputTheme.inputTextStyle!.copyWith( hintStyle: _streamChatTheme.messageInputTheme.inputTextStyle!.copyWith(
color: _streamChatTheme.colorTheme.grey, color: _streamChatTheme.colorTheme.textLowEmphasis,
), ),
border: const OutlineInputBorder( border: const OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
@@ -620,7 +622,7 @@ class MessageInputState extends State<MessageInput> {
constraints: BoxConstraints.tight(const Size(64, 24)), constraints: BoxConstraints.tight(const Size(64, 24)),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
color: _streamChatTheme.colorTheme.accentBlue, color: _streamChatTheme.colorTheme.accentPrimary,
), ),
alignment: Alignment.center, alignment: Alignment.center,
child: Row( child: Row(
@@ -834,12 +836,12 @@ class MessageInputState extends State<MessageInput> {
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
color: _streamChatTheme.colorTheme.white, color: _streamChatTheme.colorTheme.barsBg,
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
child: Container( child: Container(
constraints: BoxConstraints.loose(const Size.fromHeight(400)), constraints: BoxConstraints.loose(const Size.fromHeight(400)),
decoration: BoxDecoration( decoration: BoxDecoration(
color: _streamChatTheme.colorTheme.white, color: _streamChatTheme.colorTheme.barsBg,
borderRadius: BorderRadius.circular(8)), borderRadius: BorderRadius.circular(8)),
child: ListView( child: ListView(
padding: const EdgeInsets.all(0), padding: const EdgeInsets.all(0),
@@ -855,14 +857,14 @@ class MessageInputState extends State<MessageInput> {
horizontal: 8, horizontal: 8,
), ),
child: StreamSvgIcon.lightning( child: StreamSvgIcon.lightning(
color: _streamChatTheme.colorTheme.accentBlue, color: _streamChatTheme.colorTheme.accentPrimary,
), ),
), ),
Text( Text(
'Instant Commands', 'Instant Commands',
style: TextStyle( style: TextStyle(
color: color: _streamChatTheme.colorTheme.textHighEmphasis
_streamChatTheme.colorTheme.black.withOpacity(.5), .withOpacity(.5),
), ),
) )
], ],
@@ -902,7 +904,7 @@ class MessageInputState extends State<MessageInput> {
color: _streamChatTheme color: _streamChatTheme
// ignore: lines_longer_than_80_chars // ignore: lines_longer_than_80_chars
.colorTheme .colorTheme
.grey, .textLowEmphasis,
), ),
), ),
], ],
@@ -946,24 +948,29 @@ class MessageInputState extends State<MessageInput> {
switch (index) { switch (index) {
case 0: case 0:
return _attachments.isEmpty return _attachments.isEmpty
? streamChatThemeData.colorTheme.accentBlue ? streamChatThemeData.colorTheme.accentPrimary
: (!_attachmentContainsFile : (!_attachmentContainsFile
? streamChatThemeData.colorTheme.accentBlue ? streamChatThemeData.colorTheme.accentPrimary
: streamChatThemeData.colorTheme.black.withOpacity(0.2)); : streamChatThemeData.colorTheme.textHighEmphasis
.withOpacity(0.2));
case 1: case 1:
return _attachmentContainsFile return _attachmentContainsFile
? streamChatThemeData.colorTheme.accentBlue ? streamChatThemeData.colorTheme.accentPrimary
: (_attachments.isEmpty : (_attachments.isEmpty
? streamChatThemeData.colorTheme.black.withOpacity(0.5) ? streamChatThemeData.colorTheme.textHighEmphasis
: streamChatThemeData.colorTheme.black.withOpacity(0.2)); .withOpacity(0.5)
: streamChatThemeData.colorTheme.textHighEmphasis
.withOpacity(0.2));
case 2: case 2:
return _attachmentContainsFile && _attachments.isNotEmpty return _attachmentContainsFile && _attachments.isNotEmpty
? streamChatThemeData.colorTheme.black.withOpacity(0.2) ? streamChatThemeData.colorTheme.textHighEmphasis.withOpacity(0.2)
: streamChatThemeData.colorTheme.black.withOpacity(0.5); : streamChatThemeData.colorTheme.textHighEmphasis
.withOpacity(0.5);
case 3: case 3:
return _attachmentContainsFile && _attachments.isNotEmpty return _attachmentContainsFile && _attachments.isNotEmpty
? streamChatThemeData.colorTheme.black.withOpacity(0.2) ? streamChatThemeData.colorTheme.textHighEmphasis.withOpacity(0.2)
: streamChatThemeData.colorTheme.black.withOpacity(0.5); : streamChatThemeData.colorTheme.textHighEmphasis
.withOpacity(0.5);
default: default:
return Colors.black; return Colors.black;
} }
@@ -973,7 +980,7 @@ class MessageInputState extends State<MessageInput> {
duration: const Duration(milliseconds: 300), duration: const Duration(milliseconds: 300),
height: _openFilePickerSection ? _filePickerSize : 0, height: _openFilePickerSection ? _filePickerSize : 0,
child: Material( child: Material(
color: _streamChatTheme.colorTheme.whiteSmoke, color: _streamChatTheme.colorTheme.inputBg,
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
@@ -1036,7 +1043,7 @@ class MessageInputState extends State<MessageInput> {
}, },
child: DecoratedBox( child: DecoratedBox(
decoration: BoxDecoration( decoration: BoxDecoration(
color: _streamChatTheme.colorTheme.white, color: _streamChatTheme.colorTheme.barsBg,
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.only(
topLeft: Radius.circular(16), topLeft: Radius.circular(16),
topRight: Radius.circular(16), topRight: Radius.circular(16),
@@ -1052,7 +1059,7 @@ class MessageInputState extends State<MessageInput> {
height: 4, height: 4,
child: DecoratedBox( child: DecoratedBox(
decoration: BoxDecoration( decoration: BoxDecoration(
color: _streamChatTheme.colorTheme.whiteSmoke, color: _streamChatTheme.colorTheme.inputBg,
borderRadius: BorderRadius.circular(4), borderRadius: BorderRadius.circular(4),
), ),
), ),
@@ -1066,7 +1073,7 @@ class MessageInputState extends State<MessageInput> {
Expanded( Expanded(
child: DecoratedBox( child: DecoratedBox(
decoration: BoxDecoration( decoration: BoxDecoration(
color: _streamChatTheme.colorTheme.white, color: _streamChatTheme.colorTheme.barsBg,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
child: _PickerWidget( child: _PickerWidget(
@@ -1153,7 +1160,7 @@ class MessageInputState extends State<MessageInput> {
); );
case 'ban': case 'ban':
return CircleAvatar( return CircleAvatar(
backgroundColor: _streamChatTheme.colorTheme.accentBlue, backgroundColor: _streamChatTheme.colorTheme.accentPrimary,
radius: 12, radius: 12,
child: StreamSvgIcon.iconUserDelete( child: StreamSvgIcon.iconUserDelete(
size: 16, size: 16,
@@ -1162,7 +1169,7 @@ class MessageInputState extends State<MessageInput> {
); );
case 'flag': case 'flag':
return CircleAvatar( return CircleAvatar(
backgroundColor: _streamChatTheme.colorTheme.accentBlue, backgroundColor: _streamChatTheme.colorTheme.accentPrimary,
radius: 12, radius: 12,
child: StreamSvgIcon.flag( child: StreamSvgIcon.flag(
size: 14, size: 14,
@@ -1171,7 +1178,7 @@ class MessageInputState extends State<MessageInput> {
); );
case 'imgur': case 'imgur':
return CircleAvatar( return CircleAvatar(
backgroundColor: _streamChatTheme.colorTheme.accentBlue, backgroundColor: _streamChatTheme.colorTheme.accentPrimary,
radius: 12, radius: 12,
child: ClipOval( child: ClipOval(
child: StreamSvgIcon.imgur( child: StreamSvgIcon.imgur(
@@ -1181,7 +1188,7 @@ class MessageInputState extends State<MessageInput> {
); );
case 'mute': case 'mute':
return CircleAvatar( return CircleAvatar(
backgroundColor: _streamChatTheme.colorTheme.accentBlue, backgroundColor: _streamChatTheme.colorTheme.accentPrimary,
radius: 12, radius: 12,
child: StreamSvgIcon.mute( child: StreamSvgIcon.mute(
size: 16, size: 16,
@@ -1190,7 +1197,7 @@ class MessageInputState extends State<MessageInput> {
); );
case 'unban': case 'unban':
return CircleAvatar( return CircleAvatar(
backgroundColor: _streamChatTheme.colorTheme.accentBlue, backgroundColor: _streamChatTheme.colorTheme.accentPrimary,
radius: 12, radius: 12,
child: StreamSvgIcon.userAdd( child: StreamSvgIcon.userAdd(
size: 16, size: 16,
@@ -1199,7 +1206,7 @@ class MessageInputState extends State<MessageInput> {
); );
case 'unmute': case 'unmute':
return CircleAvatar( return CircleAvatar(
backgroundColor: _streamChatTheme.colorTheme.accentBlue, backgroundColor: _streamChatTheme.colorTheme.accentPrimary,
radius: 12, radius: 12,
child: StreamSvgIcon.volumeUp( child: StreamSvgIcon.volumeUp(
size: 16, size: 16,
@@ -1208,7 +1215,7 @@ class MessageInputState extends State<MessageInput> {
); );
default: default:
return CircleAvatar( return CircleAvatar(
backgroundColor: _streamChatTheme.colorTheme.accentBlue, backgroundColor: _streamChatTheme.colorTheme.accentPrimary,
radius: 12, radius: 12,
child: StreamSvgIcon.lightning( child: StreamSvgIcon.lightning(
size: 16, size: 16,
@@ -1248,7 +1255,7 @@ class MessageInputState extends State<MessageInput> {
final child = Card( final child = Card(
margin: const EdgeInsets.all(8), margin: const EdgeInsets.all(8),
elevation: 2, elevation: 2,
color: _streamChatTheme.colorTheme.white, color: _streamChatTheme.colorTheme.barsBg,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
@@ -1256,7 +1263,7 @@ class MessageInputState extends State<MessageInput> {
child: Container( child: Container(
constraints: BoxConstraints.loose(const Size.fromHeight(240)), constraints: BoxConstraints.loose(const Size.fromHeight(240)),
decoration: BoxDecoration( decoration: BoxDecoration(
color: _streamChatTheme.colorTheme.white, color: _streamChatTheme.colorTheme.barsBg,
), ),
child: FutureBuilder<List<Member>>( child: FutureBuilder<List<Member>>(
future: queryMembers ?? Future.value(members), future: queryMembers ?? Future.value(members),
@@ -1272,7 +1279,7 @@ class MessageInputState extends State<MessageInput> {
.where((it) => it.user != null) .where((it) => it.user != null)
.map( .map(
(m) => Material( (m) => Material(
color: _streamChatTheme.colorTheme.white, color: _streamChatTheme.colorTheme.barsBg,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
if (m.user != null) { if (m.user != null) {
@@ -1359,7 +1366,7 @@ class MessageInputState extends State<MessageInput> {
child: Card( child: Card(
margin: const EdgeInsets.all(8), margin: const EdgeInsets.all(8),
elevation: 2, elevation: 2,
color: _streamChatTheme.colorTheme.white, color: _streamChatTheme.colorTheme.barsBg,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
@@ -1374,7 +1381,7 @@ class MessageInputState extends State<MessageInput> {
offset: Offset(0, -4), offset: Offset(0, -4),
), ),
], ],
color: _streamChatTheme.colorTheme.white, color: _streamChatTheme.colorTheme.barsBg,
), ),
child: ListView.builder( child: ListView.builder(
padding: const EdgeInsets.all(0), padding: const EdgeInsets.all(0),
@@ -1390,15 +1397,16 @@ class MessageInputState extends State<MessageInput> {
padding: padding:
const EdgeInsets.symmetric(horizontal: 8), const EdgeInsets.symmetric(horizontal: 8),
child: StreamSvgIcon.smile( child: StreamSvgIcon.smile(
color: color: _streamChatTheme
_streamChatTheme.colorTheme.accentBlue, .colorTheme.accentPrimary,
), ),
), ),
Flexible( Flexible(
child: Text( child: Text(
'Emoji matching "$query"', 'Emoji matching "$query"',
style: TextStyle( style: TextStyle(
color: _streamChatTheme.colorTheme.black color: _streamChatTheme
.colorTheme.textHighEmphasis
.withOpacity(.5), .withOpacity(.5),
), ),
), ),
@@ -1570,11 +1578,12 @@ class MessageInputState extends State<MessageInput> {
onPressed: () { onPressed: () {
setState(() => _attachments.remove(attachment.id)); setState(() => _attachments.remove(attachment.id));
}, },
fillColor: _streamChatTheme.colorTheme.black.withOpacity(.5), fillColor:
_streamChatTheme.colorTheme.textHighEmphasis.withOpacity(.5),
child: Center( child: Center(
child: StreamSvgIcon.close( child: StreamSvgIcon.close(
size: 24, size: 24,
color: _streamChatTheme.colorTheme.white, color: _streamChatTheme.colorTheme.barsBg,
), ),
), ),
), ),
@@ -1609,8 +1618,8 @@ class MessageInputState extends State<MessageInput> {
errorWidget: (_, obj, trace) => errorWidget: (_, obj, trace) =>
getFileTypeImage(attachment.extraData['other'] as String?), getFileTypeImage(attachment.extraData['other'] as String?),
placeholder: (context, _) => Shimmer.fromColors( placeholder: (context, _) => Shimmer.fromColors(
baseColor: _streamChatTheme.colorTheme.greyGainsboro, baseColor: _streamChatTheme.colorTheme.disabled,
highlightColor: _streamChatTheme.colorTheme.whiteSmoke, highlightColor: _streamChatTheme.colorTheme.inputBg,
child: Image.asset( child: Image.asset(
'images/placeholder.png', 'images/placeholder.png',
fit: BoxFit.cover, fit: BoxFit.cover,
@@ -1651,7 +1660,7 @@ class MessageInputState extends State<MessageInput> {
return IconButton( return IconButton(
icon: StreamSvgIcon.lightning( icon: StreamSvgIcon.lightning(
color: s.isNotEmpty color: s.isNotEmpty
? _streamChatTheme.colorTheme.greyGainsboro ? _streamChatTheme.colorTheme.disabled
: (_commandsOverlay != null : (_commandsOverlay != null
? _streamChatTheme.messageInputTheme.actionButtonColor ? _streamChatTheme.messageInputTheme.actionButtonColor
: _streamChatTheme.messageInputTheme.actionButtonIdleColor), : _streamChatTheme.messageInputTheme.actionButtonIdleColor),
@@ -2058,7 +2067,7 @@ class MessageInputState extends State<MessageInput> {
void _showErrorAlert(String description) { void _showErrorAlert(String description) {
showModalBottomSheet( showModalBottomSheet(
backgroundColor: _streamChatTheme.colorTheme.white, backgroundColor: _streamChatTheme.colorTheme.barsBg,
context: context, context: context,
shape: const RoundedRectangleBorder( shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@@ -2072,7 +2081,7 @@ class MessageInputState extends State<MessageInput> {
height: 26, height: 26,
), ),
StreamSvgIcon.error( StreamSvgIcon.error(
color: _streamChatTheme.colorTheme.accentRed, color: _streamChatTheme.colorTheme.accentError,
size: 24, size: 24,
), ),
const SizedBox( const SizedBox(
@@ -2096,7 +2105,8 @@ class MessageInputState extends State<MessageInput> {
height: 36, height: 36,
), ),
Container( Container(
color: _streamChatTheme.colorTheme.black.withOpacity(.08), color:
_streamChatTheme.colorTheme.textHighEmphasis.withOpacity(.08),
height: 1, height: 1,
), ),
Row( Row(
@@ -2108,8 +2118,8 @@ class MessageInputState extends State<MessageInput> {
}, },
child: Text( child: Text(
'OK', 'OK',
style: _streamChatTheme.textTheme.bodyBold style: _streamChatTheme.textTheme.bodyBold.copyWith(
.copyWith(color: _streamChatTheme.colorTheme.accentBlue), color: _streamChatTheme.colorTheme.accentPrimary),
), ),
), ),
], ],
@@ -2250,12 +2260,12 @@ class __PickerWidgetState extends State<_PickerWidget> {
}, },
child: Container( child: Container(
constraints: const BoxConstraints.expand(), constraints: const BoxConstraints.expand(),
color: widget.streamChatTheme.colorTheme.whiteSmoke, color: widget.streamChatTheme.colorTheme.inputBg,
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
'Add more files', 'Add more files',
style: TextStyle( style: TextStyle(
color: widget.streamChatTheme.colorTheme.accentBlue, color: widget.streamChatTheme.colorTheme.accentPrimary,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
@@ -2273,7 +2283,7 @@ class __PickerWidgetState extends State<_PickerWidget> {
PhotoManager.openSetting(); PhotoManager.openSetting();
}, },
child: Container( child: Container(
color: widget.streamChatTheme.colorTheme.whiteSmoke, color: widget.streamChatTheme.colorTheme.inputBg,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
@@ -2282,13 +2292,14 @@ class __PickerWidgetState extends State<_PickerWidget> {
'svgs/icon_picture_empty_state.svg', 'svgs/icon_picture_empty_state.svg',
package: 'stream_chat_flutter', package: 'stream_chat_flutter',
height: 140, height: 140,
color: widget.streamChatTheme.colorTheme.greyGainsboro, color: widget.streamChatTheme.colorTheme.disabled,
), ),
Text( Text(
// ignore: lines_longer_than_80_chars // ignore: lines_longer_than_80_chars
'Please enable access to your photos \nand videos so you can share them with friends.', 'Please enable access to your photos \nand videos so you can share them with friends.',
style: widget.streamChatTheme.textTheme.body.copyWith( style: widget.streamChatTheme.textTheme.body.copyWith(
color: widget.streamChatTheme.colorTheme.grey), color:
widget.streamChatTheme.colorTheme.textLowEmphasis),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
const SizedBox(height: 6), const SizedBox(height: 6),
@@ -2296,7 +2307,7 @@ class __PickerWidgetState extends State<_PickerWidget> {
child: Text( child: Text(
'Allow access to your gallery', 'Allow access to your gallery',
style: widget.streamChatTheme.textTheme.bodyBold.copyWith( style: widget.streamChatTheme.textTheme.bodyBold.copyWith(
color: widget.streamChatTheme.colorTheme.accentBlue, color: widget.streamChatTheme.colorTheme.accentPrimary,
), ),
), ),
), ),
@@ -368,7 +368,8 @@ class _MessageListViewState extends State<MessageListView> {
child: Text( child: Text(
'No chats here yet...', 'No chats here yet...',
style: _streamTheme.textTheme.footnote.copyWith( style: _streamTheme.textTheme.footnote.copyWith(
color: _streamTheme.colorTheme.black.withOpacity(.5)), color: _streamTheme.colorTheme.textHighEmphasis
.withOpacity(.5)),
), ),
), ),
messageListBuilder: widget.messageListBuilder ?? messageListBuilder: widget.messageListBuilder ??
@@ -380,7 +381,8 @@ class _MessageListViewState extends State<MessageListView> {
child: Text( child: Text(
'Something went wrong', 'Something went wrong',
style: _streamTheme.textTheme.footnote.copyWith( style: _streamTheme.textTheme.footnote.copyWith(
color: _streamTheme.colorTheme.black.withOpacity(.5)), color: _streamTheme.colorTheme.textHighEmphasis
.withOpacity(.5)),
), ),
), ),
); );
@@ -710,7 +712,7 @@ class _MessageListViewState extends State<MessageListView> {
clipBehavior: Clip.none, clipBehavior: Clip.none,
children: [ children: [
FloatingActionButton( FloatingActionButton(
backgroundColor: _streamTheme.colorTheme.white, backgroundColor: _streamTheme.colorTheme.barsBg,
onPressed: () { onPressed: () {
if (unreadCount > 0) { if (unreadCount > 0) {
streamChannel!.channel.markRead(); streamChannel!.channel.markRead();
@@ -729,7 +731,7 @@ class _MessageListViewState extends State<MessageListView> {
} }
}, },
child: StreamSvgIcon.down( child: StreamSvgIcon.down(
color: _streamTheme.colorTheme.black, color: _streamTheme.colorTheme.textHighEmphasis,
), ),
), ),
if (showUnreadCount) if (showUnreadCount)
@@ -1106,7 +1108,7 @@ class _MessageListViewState extends State<MessageListView> {
widget.onMessageSwiped?.call(message); widget.onMessageSwiped?.call(message);
}, },
backgroundIcon: StreamSvgIcon.reply( backgroundIcon: StreamSvgIcon.reply(
color: _streamTheme.colorTheme.accentBlue, color: _streamTheme.colorTheme.accentPrimary,
), ),
child: child, child: child,
), ),
@@ -1122,7 +1124,7 @@ class _MessageListViewState extends State<MessageListView> {
child = TweenAnimationBuilder<Color?>( child = TweenAnimationBuilder<Color?>(
tween: ColorTween( tween: ColorTween(
begin: highlightColor, begin: highlightColor,
end: colorTheme.white.withOpacity(0), end: colorTheme.barsBg.withOpacity(0),
), ),
duration: const Duration(seconds: 3), duration: const Duration(seconds: 3),
onEnd: () => initialMessageHighlightComplete = true, onEnd: () => initialMessageHighlightComplete = true,
@@ -1252,7 +1254,7 @@ class _LoadingIndicator extends StatelessWidget {
stream: stream, stream: stream,
initialData: false, initialData: false,
errorBuilder: (context, error) => Container( errorBuilder: (context, error) => Container(
color: streamTheme.colorTheme.accentRed.withOpacity(.2), color: streamTheme.colorTheme.accentError.withOpacity(.2),
child: const Center( child: const Center(
child: Text('Error loading messages'), child: Text('Error loading messages'),
), ),
@@ -142,7 +142,7 @@ class MessageReactionsModal extends StatelessWidget {
Widget _buildReactionCard(BuildContext context, User? user) { Widget _buildReactionCard(BuildContext context, User? user) {
final chatThemeData = StreamChatTheme.of(context); final chatThemeData = StreamChatTheme.of(context);
return Card( return Card(
color: chatThemeData.colorTheme.white, color: chatThemeData.colorTheme.barsBg,
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.circular(16),
@@ -224,7 +224,7 @@ class MessageReactionsModal extends StatelessWidget {
messageTheme.reactionsBorderColor ?? Colors.transparent, messageTheme.reactionsBorderColor ?? Colors.transparent,
backgroundColor: messageTheme.reactionsBackgroundColor ?? backgroundColor: messageTheme.reactionsBackgroundColor ??
Colors.transparent, Colors.transparent,
maskColor: chatThemeData.colorTheme.white, maskColor: chatThemeData.colorTheme.barsBg,
tailCirclesSpacing: 1, tailCirclesSpacing: 1,
highlightOwnReactions: false, highlightOwnReactions: false,
), ),
@@ -199,7 +199,7 @@ class _MessageSearchListViewState extends State<MessageSearchListView> {
Widget _separatorBuilder(BuildContext context, int index) => Container( Widget _separatorBuilder(BuildContext context, int index) => Container(
height: 1, height: 1,
color: StreamChatTheme.of(context).colorTheme.greyWhisper, color: StreamChatTheme.of(context).colorTheme.borders,
); );
Widget _listItemBuilder( Widget _listItemBuilder(
@@ -224,7 +224,7 @@ class _MessageSearchListViewState extends State<MessageSearchListView> {
return Container( return Container(
color: StreamChatTheme.of(context) color: StreamChatTheme.of(context)
.colorTheme .colorTheme
.accentRed .accentError
.withOpacity(.2), .withOpacity(.2),
child: const Padding( child: const Padding(
padding: EdgeInsets.symmetric(vertical: 16), padding: EdgeInsets.symmetric(vertical: 16),
@@ -294,7 +294,7 @@ class _MessageSearchListViewState extends State<MessageSearchListView> {
child: Text( child: Text(
'${items.length} results', '${items.length} results',
style: TextStyle( style: TextStyle(
color: chatThemeData.colorTheme.grey, color: chatThemeData.colorTheme.textLowEmphasis,
), ),
), ),
), ),
@@ -222,7 +222,7 @@ class MessageWidget extends StatefulWidget {
final border = RoundedRectangleBorder( final border = RoundedRectangleBorder(
side: attachmentBorderSide ?? side: attachmentBorderSide ??
BorderSide( BorderSide(
color: StreamChatTheme.of(context).colorTheme.greyWhisper, color: StreamChatTheme.of(context).colorTheme.borders,
), ),
borderRadius: attachmentBorderRadiusGeometry ?? BorderRadius.zero, borderRadius: attachmentBorderRadiusGeometry ?? BorderRadius.zero,
); );
@@ -749,7 +749,7 @@ class _MessageWidgetState extends State<MessageWidget>
child: CustomPaint( child: CustomPaint(
painter: ReactionBubblePainter( painter: ReactionBubblePainter(
_streamChatTheme _streamChatTheme
.colorTheme.white, .colorTheme.barsBg,
Colors.transparent, Colors.transparent,
Colors.transparent, Colors.transparent,
tailCirclesSpace: 1, tailCirclesSpace: 1,
@@ -835,14 +835,14 @@ class _MessageWidgetState extends State<MessageWidget>
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
StreamSvgIcon.eye( StreamSvgIcon.eye(
color: chatThemeData.colorTheme.grey, color: chatThemeData.colorTheme.textLowEmphasis,
size: 16, size: 16,
), ),
const SizedBox(width: 8), const SizedBox(width: 8),
Text( Text(
'Only visible to you', 'Only visible to you',
style: chatThemeData.textTheme.footnote style: chatThemeData.textTheme.footnote
.copyWith(color: chatThemeData.colorTheme.grey), .copyWith(color: chatThemeData.colorTheme.textLowEmphasis),
), ),
], ],
); );
@@ -1218,7 +1218,7 @@ class _MessageWidgetState extends State<MessageWidget>
Text( Text(
widget.readList!.length.toString(), widget.readList!.length.toString(),
style: style.copyWith( style: style.copyWith(
color: _streamChatTheme.colorTheme.accentBlue, color: _streamChatTheme.colorTheme.accentPrimary,
), ),
), ),
const SizedBox(width: 2), const SizedBox(width: 2),
@@ -1292,7 +1292,7 @@ class _MessageWidgetState extends State<MessageWidget>
Text( Text(
'Pinned by ${pinnedByMe ? 'You' : pinnedBy.name}', 'Pinned by ${pinnedByMe ? 'You' : pinnedBy.name}',
style: TextStyle( style: TextStyle(
color: _streamChatTheme.colorTheme.grey, color: _streamChatTheme.colorTheme.textLowEmphasis,
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
@@ -1310,7 +1310,7 @@ class _MessageWidgetState extends State<MessageWidget>
} }
if (hasUrlAttachments) { if (hasUrlAttachments) {
return _streamChatTheme.colorTheme.blueAlice; return _streamChatTheme.colorTheme.linkBg;
} }
if (isOnlyEmoji) { if (isOnlyEmoji) {
@@ -1366,7 +1366,7 @@ class _ThreadParticipants extends StatelessWidget {
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: _streamChatTheme.colorTheme.white, color: _streamChatTheme.colorTheme.barsBg,
), ),
padding: const EdgeInsets.all(1), padding: const EdgeInsets.all(1),
child: UserAvatar( child: UserAvatar(
@@ -1395,7 +1395,7 @@ class _ThreadReplyPainter extends CustomPainter {
@override @override
void paint(Canvas canvas, Size size) { void paint(Canvas canvas, Size size) {
final paint = Paint() final paint = Paint()
..color = color ?? StreamChatTheme.of(context!).colorTheme.greyGainsboro ..color = color ?? StreamChatTheme.of(context!).colorTheme.disabled
..style = PaintingStyle.stroke ..style = PaintingStyle.stroke
..strokeWidth = 1 ..strokeWidth = 1
..strokeCap = StrokeCap.round; ..strokeCap = StrokeCap.round;
@@ -46,11 +46,11 @@ class OptionListTile extends StatelessWidget {
return Column( return Column(
children: [ children: [
Container( Container(
color: separatorColor ?? chatThemeData.colorTheme.greyGainsboro, color: separatorColor ?? chatThemeData.colorTheme.disabled,
height: 1, height: 1,
), ),
Material( Material(
color: tileColor ?? chatThemeData.colorTheme.white, color: tileColor ?? chatThemeData.colorTheme.barsBg,
child: SizedBox( child: SizedBox(
height: 63, height: 63,
child: InkWell( child: InkWell(
@@ -154,7 +154,7 @@ class QuotedMessageWidget extends StatelessWidget {
color: _getBackgroundColor(context), color: _getBackgroundColor(context),
border: showBorder border: showBorder
? Border.all( ? Border.all(
color: StreamChatTheme.of(context).colorTheme.greyGainsboro, color: StreamChatTheme.of(context).colorTheme.disabled,
) )
: null, : null,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@@ -280,7 +280,7 @@ class QuotedMessageWidget extends StatelessWidget {
Color? _getBackgroundColor(BuildContext context) { Color? _getBackgroundColor(BuildContext context) {
if (_containsScrapeUrl) { if (_containsScrapeUrl) {
return StreamChatTheme.of(context).colorTheme.blueAlice; return StreamChatTheme.of(context).colorTheme.linkBg;
} }
return messageTheme.messageBackgroundColor; return messageTheme.messageBackgroundColor;
} }
@@ -141,8 +141,8 @@ class ReactionBubble extends StatelessWidget {
Icons.help_outline_rounded, Icons.help_outline_rounded,
size: 16, size: 16,
color: (!highlightOwnReactions || reaction.user?.id == userId) color: (!highlightOwnReactions || reaction.user?.id == userId)
? chatThemeData.colorTheme.accentBlue ? chatThemeData.colorTheme.accentPrimary
: chatThemeData.colorTheme.black.withOpacity(.5), : chatThemeData.colorTheme.textHighEmphasis.withOpacity(.5),
), ),
); );
} }
@@ -49,7 +49,7 @@ class _ReactionPickerState extends State<ReactionPicker>
final child = Material( final child = Material(
borderRadius: BorderRadius.circular(24), borderRadius: BorderRadius.circular(24),
color: chatThemeData.colorTheme.white, color: chatThemeData.colorTheme.barsBg,
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
@@ -25,7 +25,7 @@ class SendingIndicator extends StatelessWidget {
if (isMessageRead) { if (isMessageRead) {
return StreamSvgIcon.checkAll( return StreamSvgIcon.checkAll(
size: size, size: size,
color: StreamChatTheme.of(context).colorTheme.accentBlue, color: StreamChatTheme.of(context).colorTheme.accentPrimary,
); );
} }
if (message.status == MessageSendingStatus.sent) { if (message.status == MessageSendingStatus.sent) {
@@ -101,8 +101,8 @@ class StreamChatState extends State<StreamChat> {
return Theme( return Theme(
data: materialTheme.copyWith( data: materialTheme.copyWith(
primaryIconTheme: streamTheme.primaryIconTheme, primaryIconTheme: streamTheme.primaryIconTheme,
accentColor: streamTheme.colorTheme.accentBlue, accentColor: streamTheme.colorTheme.accentPrimary,
scaffoldBackgroundColor: streamTheme.colorTheme.white, scaffoldBackgroundColor: streamTheme.colorTheme.barsBg,
), ),
child: StreamChatCore( child: StreamChatCore(
client: client, client: client,
@@ -114,7 +114,7 @@ class StreamChatThemeData {
final defaultTheme = StreamChatThemeData(brightness: theme.brightness); final defaultTheme = StreamChatThemeData(brightness: theme.brightness);
final customizedTheme = StreamChatThemeData.fromColorAndTextTheme( final customizedTheme = StreamChatThemeData.fromColorAndTextTheme(
defaultTheme.colorTheme.copyWith( defaultTheme.colorTheme.copyWith(
accentBlue: theme.accentColor, accentPrimary: theme.accentColor,
), ),
defaultTheme.textTheme, defaultTheme.textTheme,
); );
@@ -216,8 +216,9 @@ class StreamChatThemeData {
ColorTheme colorTheme, ColorTheme colorTheme,
TextTheme textTheme, TextTheme textTheme,
) { ) {
final accentColor = colorTheme.accentBlue; final accentColor = colorTheme.accentPrimary;
final iconTheme = IconThemeData(color: colorTheme.black.withOpacity(.5)); final iconTheme =
IconThemeData(color: colorTheme.textHighEmphasis.withOpacity(.5));
return StreamChatThemeData.raw( return StreamChatThemeData.raw(
textTheme: textTheme, textTheme: textTheme,
colorTheme: colorTheme, colorTheme: colorTheme,
@@ -231,7 +232,7 @@ class StreamChatThemeData {
), ),
), ),
channelPreviewTheme: ChannelPreviewTheme( channelPreviewTheme: ChannelPreviewTheme(
unreadCounterColor: colorTheme.accentRed, unreadCounterColor: colorTheme.accentError,
avatarTheme: AvatarTheme( avatarTheme: AvatarTheme(
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
constraints: const BoxConstraints.tightFor( constraints: const BoxConstraints.tightFor(
@@ -244,7 +245,7 @@ class StreamChatThemeData {
color: const Color(0xff7A7A7A), color: const Color(0xff7A7A7A),
), ),
lastMessageAt: textTheme.footnote.copyWith( lastMessageAt: textTheme.footnote.copyWith(
color: colorTheme.black.withOpacity(.5), color: colorTheme.textHighEmphasis.withOpacity(.5),
), ),
indicatorIconSize: 16, indicatorIconSize: 16,
), ),
@@ -256,7 +257,7 @@ class StreamChatThemeData {
width: 40, width: 40,
), ),
), ),
color: colorTheme.white, color: colorTheme.barsBg,
title: textTheme.headlineBold, title: textTheme.headlineBold,
), ),
channelTheme: ChannelTheme( channelTheme: ChannelTheme(
@@ -268,7 +269,7 @@ class StreamChatThemeData {
width: 40, width: 40,
), ),
), ),
color: colorTheme.white, color: colorTheme.barsBg,
title: textTheme.headlineBold, title: textTheme.headlineBold,
subtitle: textTheme.footnote.copyWith( subtitle: textTheme.footnote.copyWith(
color: const Color(0xff7A7A7A), color: const Color(0xff7A7A7A),
@@ -276,15 +277,17 @@ class StreamChatThemeData {
), ),
), ),
ownMessageTheme: MessageTheme( ownMessageTheme: MessageTheme(
messageAuthor: textTheme.footnote.copyWith(color: colorTheme.grey), messageAuthor:
textTheme.footnote.copyWith(color: colorTheme.textLowEmphasis),
messageText: textTheme.body, messageText: textTheme.body,
createdAt: textTheme.footnote.copyWith(color: colorTheme.grey), createdAt:
textTheme.footnote.copyWith(color: colorTheme.textLowEmphasis),
replies: textTheme.footnoteBold.copyWith(color: accentColor), replies: textTheme.footnoteBold.copyWith(color: accentColor),
messageBackgroundColor: colorTheme.greyGainsboro, messageBackgroundColor: colorTheme.disabled,
reactionsBackgroundColor: colorTheme.white, reactionsBackgroundColor: colorTheme.barsBg,
reactionsBorderColor: colorTheme.greyWhisper, reactionsBorderColor: colorTheme.borders,
reactionsMaskColor: colorTheme.whiteSnow, reactionsMaskColor: colorTheme.appBg,
messageBorderColor: colorTheme.greyGainsboro, messageBorderColor: colorTheme.disabled,
avatarTheme: AvatarTheme( avatarTheme: AvatarTheme(
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
constraints: const BoxConstraints.tightFor( constraints: const BoxConstraints.tightFor(
@@ -297,18 +300,20 @@ class StreamChatThemeData {
), ),
), ),
otherMessageTheme: MessageTheme( otherMessageTheme: MessageTheme(
reactionsBackgroundColor: colorTheme.greyGainsboro, reactionsBackgroundColor: colorTheme.disabled,
reactionsBorderColor: colorTheme.white, reactionsBorderColor: colorTheme.barsBg,
reactionsMaskColor: colorTheme.whiteSnow, reactionsMaskColor: colorTheme.appBg,
messageText: textTheme.body, messageText: textTheme.body,
createdAt: textTheme.footnote.copyWith(color: colorTheme.grey), createdAt:
messageAuthor: textTheme.footnote.copyWith(color: colorTheme.grey), textTheme.footnote.copyWith(color: colorTheme.textLowEmphasis),
messageAuthor:
textTheme.footnote.copyWith(color: colorTheme.textLowEmphasis),
replies: textTheme.footnoteBold.copyWith(color: accentColor), replies: textTheme.footnoteBold.copyWith(color: accentColor),
messageLinks: TextStyle( messageLinks: TextStyle(
color: accentColor, color: accentColor,
), ),
messageBackgroundColor: colorTheme.white, messageBackgroundColor: colorTheme.barsBg,
messageBorderColor: colorTheme.greyWhisper, messageBorderColor: colorTheme.borders,
avatarTheme: AvatarTheme( avatarTheme: AvatarTheme(
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
constraints: const BoxConstraints.tightFor( constraints: const BoxConstraints.tightFor(
@@ -320,23 +325,23 @@ class StreamChatThemeData {
messageInputTheme: MessageInputTheme( messageInputTheme: MessageInputTheme(
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
sendAnimationDuration: const Duration(milliseconds: 300), sendAnimationDuration: const Duration(milliseconds: 300),
actionButtonColor: colorTheme.accentBlue, actionButtonColor: colorTheme.accentPrimary,
actionButtonIdleColor: colorTheme.grey, actionButtonIdleColor: colorTheme.textLowEmphasis,
expandButtonColor: colorTheme.accentBlue, expandButtonColor: colorTheme.accentPrimary,
sendButtonColor: colorTheme.accentBlue, sendButtonColor: colorTheme.accentPrimary,
sendButtonIdleColor: colorTheme.greyGainsboro, sendButtonIdleColor: colorTheme.disabled,
inputBackground: colorTheme.white, inputBackground: colorTheme.barsBg,
inputTextStyle: textTheme.body, inputTextStyle: textTheme.body,
idleBorderGradient: LinearGradient( idleBorderGradient: LinearGradient(
colors: [ colors: [
colorTheme.greyGainsboro, colorTheme.disabled,
colorTheme.greyGainsboro, colorTheme.disabled,
], ],
), ),
activeBorderGradient: LinearGradient( activeBorderGradient: LinearGradient(
colors: [ colors: [
colorTheme.greyGainsboro, colorTheme.disabled,
colorTheme.greyGainsboro, colorTheme.disabled,
], ],
), ),
), ),
@@ -347,7 +352,7 @@ class StreamChatThemeData {
final theme = StreamChatTheme.of(context); final theme = StreamChatTheme.of(context);
return StreamSvgIcon.loveReaction( return StreamSvgIcon.loveReaction(
color: highlighted color: highlighted
? theme.colorTheme.accentBlue ? theme.colorTheme.accentPrimary
: theme.primaryIconTheme.color!.withOpacity(.5), : theme.primaryIconTheme.color!.withOpacity(.5),
size: size, size: size,
); );
@@ -359,7 +364,7 @@ class StreamChatThemeData {
final theme = StreamChatTheme.of(context); final theme = StreamChatTheme.of(context);
return StreamSvgIcon.thumbsUpReaction( return StreamSvgIcon.thumbsUpReaction(
color: highlighted color: highlighted
? theme.colorTheme.accentBlue ? theme.colorTheme.accentPrimary
: theme.primaryIconTheme.color!.withOpacity(.5), : theme.primaryIconTheme.color!.withOpacity(.5),
size: size, size: size,
); );
@@ -371,7 +376,7 @@ class StreamChatThemeData {
final theme = StreamChatTheme.of(context); final theme = StreamChatTheme.of(context);
return StreamSvgIcon.thumbsDownReaction( return StreamSvgIcon.thumbsDownReaction(
color: highlighted color: highlighted
? theme.colorTheme.accentBlue ? theme.colorTheme.accentPrimary
: theme.primaryIconTheme.color!.withOpacity(.5), : theme.primaryIconTheme.color!.withOpacity(.5),
size: size, size: size,
); );
@@ -383,7 +388,7 @@ class StreamChatThemeData {
final theme = StreamChatTheme.of(context); final theme = StreamChatTheme.of(context);
return StreamSvgIcon.lolReaction( return StreamSvgIcon.lolReaction(
color: highlighted color: highlighted
? theme.colorTheme.accentBlue ? theme.colorTheme.accentPrimary
: theme.primaryIconTheme.color!.withOpacity(.5), : theme.primaryIconTheme.color!.withOpacity(.5),
size: size, size: size,
); );
@@ -395,7 +400,7 @@ class StreamChatThemeData {
final theme = StreamChatTheme.of(context); final theme = StreamChatTheme.of(context);
return StreamSvgIcon.wutReaction( return StreamSvgIcon.wutReaction(
color: highlighted color: highlighted
? theme.colorTheme.accentBlue ? theme.colorTheme.accentPrimary
: theme.primaryIconTheme.color!.withOpacity(.5), : theme.primaryIconTheme.color!.withOpacity(.5),
size: size, size: size,
); );
@@ -572,17 +577,17 @@ class TextTheme {
class ColorTheme { class ColorTheme {
/// Initialise with light theme /// Initialise with light theme
ColorTheme.light({ ColorTheme.light({
this.black = const Color(0xff000000), this.textHighEmphasis = const Color(0xff000000),
this.grey = const Color(0xff7a7a7a), this.textLowEmphasis = const Color(0xff7a7a7a),
this.greyGainsboro = const Color(0xffdbdbdb), this.disabled = const Color(0xffdbdbdb),
this.greyWhisper = const Color(0xffecebeb), this.borders = const Color(0xffecebeb),
this.whiteSmoke = const Color(0xfff2f2f2), this.inputBg = const Color(0xfff2f2f2),
this.whiteSnow = const Color(0xfffcfcfc), this.appBg = const Color(0xfffcfcfc),
this.white = const Color(0xffffffff), this.barsBg = const Color(0xffffffff),
this.blueAlice = const Color(0xffe9f2ff), this.linkBg = const Color(0xffe9f2ff),
this.accentBlue = const Color(0xff005FFF), this.accentPrimary = const Color(0xff005FFF),
this.accentRed = const Color(0xffFF3842), this.accentError = const Color(0xffFF3842),
this.accentGreen = const Color(0xff20E070), this.accentInfo = const Color(0xff20E070),
this.highlight = const Color(0xfffbf4dd), this.highlight = const Color(0xfffbf4dd),
this.overlay = const Color.fromRGBO(0, 0, 0, 0.2), this.overlay = const Color.fromRGBO(0, 0, 0, 0.2),
this.overlayDark = const Color.fromRGBO(0, 0, 0, 0.6), this.overlayDark = const Color.fromRGBO(0, 0, 0, 0.6),
@@ -604,17 +609,17 @@ class ColorTheme {
/// Initialise with dark theme /// Initialise with dark theme
ColorTheme.dark({ ColorTheme.dark({
this.black = const Color(0xffffffff), this.textHighEmphasis = const Color(0xffffffff),
this.grey = const Color(0xff7a7a7a), this.textLowEmphasis = const Color(0xff7a7a7a),
this.greyGainsboro = const Color(0xff2d2f2f), this.disabled = const Color(0xff2d2f2f),
this.greyWhisper = const Color(0xff1c1e22), this.borders = const Color(0xff1c1e22),
this.whiteSmoke = const Color(0xff13151b), this.inputBg = const Color(0xff13151b),
this.whiteSnow = const Color(0xff070A0D), this.appBg = const Color(0xff070A0D),
this.white = const Color(0xff101418), this.barsBg = const Color(0xff101418),
this.blueAlice = const Color(0xff00193D), this.linkBg = const Color(0xff00193D),
this.accentBlue = const Color(0xff005FFF), this.accentPrimary = const Color(0xff005FFF),
this.accentRed = const Color(0xffFF3742), this.accentError = const Color(0xffFF3742),
this.accentGreen = const Color(0xff20E070), this.accentInfo = const Color(0xff20E070),
this.borderTop = const Effect( this.borderTop = const Effect(
sigmaX: 0, sigmaX: 0,
sigmaY: -1, sigmaY: -1,
@@ -657,37 +662,37 @@ class ColorTheme {
}) : brightness = Brightness.dark; }) : brightness = Brightness.dark;
/// ///
final Color black; final Color textHighEmphasis;
/// ///
final Color grey; final Color textLowEmphasis;
/// ///
final Color greyGainsboro; final Color disabled;
/// ///
final Color greyWhisper; final Color borders;
/// ///
final Color whiteSmoke; final Color inputBg;
/// ///
final Color whiteSnow; final Color appBg;
/// ///
final Color white; final Color barsBg;
/// ///
final Color blueAlice; final Color linkBg;
/// ///
final Color accentBlue; final Color accentPrimary;
/// ///
final Color accentRed; final Color accentError;
/// ///
final Color accentGreen; final Color accentInfo;
/// ///
final Effect borderTop; final Effect borderTop;
@@ -719,17 +724,17 @@ class ColorTheme {
/// Copy with theme /// Copy with theme
ColorTheme copyWith({ ColorTheme copyWith({
Brightness brightness = Brightness.light, Brightness brightness = Brightness.light,
Color? black, Color? textHighEmphasis,
Color? grey, Color? textLowEmphasis,
Color? greyGainsboro, Color? disabled,
Color? greyWhisper, Color? borders,
Color? whiteSmoke, Color? inputBg,
Color? whiteSnow, Color? appBg,
Color? white, Color? barsBg,
Color? blueAlice, Color? linkBg,
Color? accentBlue, Color? accentPrimary,
Color? accentRed, Color? accentError,
Color? accentGreen, Color? accentInfo,
Effect? borderTop, Effect? borderTop,
Effect? borderBottom, Effect? borderBottom,
Effect? shadowIconButton, Effect? shadowIconButton,
@@ -741,17 +746,17 @@ class ColorTheme {
}) => }) =>
brightness == Brightness.light brightness == Brightness.light
? ColorTheme.light( ? ColorTheme.light(
black: black ?? this.black, textHighEmphasis: textHighEmphasis ?? this.textHighEmphasis,
grey: grey ?? this.grey, textLowEmphasis: textLowEmphasis ?? this.textLowEmphasis,
greyGainsboro: greyGainsboro ?? this.greyGainsboro, disabled: disabled ?? this.disabled,
greyWhisper: greyWhisper ?? this.greyWhisper, borders: borders ?? this.borders,
whiteSmoke: whiteSmoke ?? this.whiteSmoke, inputBg: inputBg ?? this.inputBg,
whiteSnow: whiteSnow ?? this.whiteSnow, appBg: appBg ?? this.appBg,
white: white ?? this.white, barsBg: barsBg ?? this.barsBg,
blueAlice: blueAlice ?? this.blueAlice, linkBg: linkBg ?? this.linkBg,
accentBlue: accentBlue ?? this.accentBlue, accentPrimary: accentPrimary ?? this.accentPrimary,
accentRed: accentRed ?? this.accentRed, accentError: accentError ?? this.accentError,
accentGreen: accentGreen ?? this.accentGreen, accentInfo: accentInfo ?? this.accentInfo,
borderTop: borderTop ?? this.borderTop, borderTop: borderTop ?? this.borderTop,
borderBottom: borderBottom ?? this.borderBottom, borderBottom: borderBottom ?? this.borderBottom,
shadowIconButton: shadowIconButton ?? this.shadowIconButton, shadowIconButton: shadowIconButton ?? this.shadowIconButton,
@@ -762,17 +767,17 @@ class ColorTheme {
bgGradient: bgGradient ?? this.bgGradient, bgGradient: bgGradient ?? this.bgGradient,
) )
: ColorTheme.dark( : ColorTheme.dark(
black: black ?? this.black, textHighEmphasis: textHighEmphasis ?? this.textHighEmphasis,
grey: grey ?? this.grey, textLowEmphasis: textLowEmphasis ?? this.textLowEmphasis,
greyGainsboro: greyGainsboro ?? this.greyGainsboro, disabled: disabled ?? this.disabled,
greyWhisper: greyWhisper ?? this.greyWhisper, borders: borders ?? this.borders,
whiteSmoke: whiteSmoke ?? this.whiteSmoke, inputBg: inputBg ?? this.inputBg,
whiteSnow: whiteSnow ?? this.whiteSnow, appBg: appBg ?? this.appBg,
white: white ?? this.white, barsBg: barsBg ?? this.barsBg,
blueAlice: blueAlice ?? this.blueAlice, linkBg: linkBg ?? this.linkBg,
accentBlue: accentBlue ?? this.accentBlue, accentPrimary: accentPrimary ?? this.accentPrimary,
accentRed: accentRed ?? this.accentRed, accentError: accentError ?? this.accentError,
accentGreen: accentGreen ?? this.accentGreen, accentInfo: accentInfo ?? this.accentInfo,
borderTop: borderTop ?? this.borderTop, borderTop: borderTop ?? this.borderTop,
borderBottom: borderBottom ?? this.borderBottom, borderBottom: borderBottom ?? this.borderBottom,
shadowIconButton: shadowIconButton ?? this.shadowIconButton, shadowIconButton: shadowIconButton ?? this.shadowIconButton,
@@ -787,17 +792,17 @@ class ColorTheme {
ColorTheme merge(ColorTheme? other) { ColorTheme merge(ColorTheme? other) {
if (other == null) return this; if (other == null) return this;
return copyWith( return copyWith(
black: other.black, textHighEmphasis: other.textHighEmphasis,
grey: other.grey, textLowEmphasis: other.textLowEmphasis,
greyGainsboro: other.greyGainsboro, disabled: other.disabled,
greyWhisper: other.greyWhisper, borders: other.borders,
whiteSmoke: other.whiteSmoke, inputBg: other.inputBg,
whiteSnow: other.whiteSnow, appBg: other.appBg,
white: other.white, barsBg: other.barsBg,
blueAlice: other.blueAlice, linkBg: other.linkBg,
accentBlue: other.accentBlue, accentPrimary: other.accentPrimary,
accentRed: other.accentRed, accentError: other.accentError,
accentGreen: other.accentGreen, accentInfo: other.accentInfo,
highlight: other.highlight, highlight: other.highlight,
overlay: other.overlay, overlay: other.overlay,
overlayDark: other.overlayDark, overlayDark: other.overlayDark,
@@ -151,9 +151,8 @@ class _SwipeableState extends State<Swipeable> with TickerProviderStateMixin {
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
border: Border.all( border: Border.all(
color: StreamChatTheme.of(context) color:
.colorTheme StreamChatTheme.of(context).colorTheme.disabled,
.greyGainsboro,
), ),
), ),
child: widget.backgroundIcon, child: widget.backgroundIcon,
@@ -32,7 +32,7 @@ class SystemMessage extends StatelessWidget {
textAlign: TextAlign.center, textAlign: TextAlign.center,
softWrap: true, softWrap: true,
style: theme.textTheme.captionBold.copyWith( style: theme.textTheme.captionBold.copyWith(
color: theme.colorTheme.grey, color: theme.colorTheme.textLowEmphasis,
), ),
), ),
); );
@@ -59,7 +59,7 @@ class UploadProgressIndicator extends StatelessWidget {
'${_percentage.toInt()}%', '${_percentage.toInt()}%',
style: textStyle ?? style: textStyle ??
theme.textTheme.footnote.copyWith( theme.textTheme.footnote.copyWith(
color: theme.colorTheme.white, color: theme.colorTheme.barsBg,
), ),
), ),
], ],
@@ -60,7 +60,7 @@ class UrlAttachment extends StatelessWidget {
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.only(
topRight: Radius.circular(16), topRight: Radius.circular(16),
), ),
color: chatThemeData.colorTheme.blueAlice, color: chatThemeData.colorTheme.linkBg,
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
@@ -71,7 +71,7 @@ class UrlAttachment extends StatelessWidget {
child: Text( child: Text(
hostDisplayName, hostDisplayName,
style: chatThemeData.textTheme.bodyBold.copyWith( style: chatThemeData.textTheme.bodyBold.copyWith(
color: chatThemeData.colorTheme.accentBlue, color: chatThemeData.colorTheme.accentPrimary,
), ),
), ),
), ),
@@ -70,7 +70,7 @@ class UserAvatar extends StatelessWidget {
constraints: constraints ?? constraints: constraints ??
streamChatTheme.ownMessageTheme.avatarTheme?.constraints, streamChatTheme.ownMessageTheme.avatarTheme?.constraints,
decoration: BoxDecoration( decoration: BoxDecoration(
color: streamChatTheme.colorTheme.accentBlue, color: streamChatTheme.colorTheme.accentPrimary,
), ),
child: hasImage child: hasImage
? CachedNetworkImage( ? CachedNetworkImage(
@@ -95,7 +95,7 @@ class UserAvatar extends StatelessWidget {
child: Container( child: Container(
constraints: constraints ?? constraints: constraints ??
streamChatTheme.ownMessageTheme.avatarTheme?.constraints, streamChatTheme.ownMessageTheme.avatarTheme?.constraints,
color: selectionColor ?? streamChatTheme.colorTheme.accentBlue, color: selectionColor ?? streamChatTheme.colorTheme.accentPrimary,
child: Padding( child: Padding(
padding: EdgeInsets.all(selectionThickness), padding: EdgeInsets.all(selectionThickness),
child: avatar, child: avatar,
@@ -115,7 +115,7 @@ class UserAvatar extends StatelessWidget {
alignment: onlineIndicatorAlignment, alignment: onlineIndicatorAlignment,
child: Material( child: Material(
type: MaterialType.circle, type: MaterialType.circle,
color: streamChatTheme.colorTheme.white, color: streamChatTheme.colorTheme.barsBg,
child: Container( child: Container(
margin: const EdgeInsets.all(2), margin: const EdgeInsets.all(2),
constraints: onlineIndicatorConstraints ?? constraints: onlineIndicatorConstraints ??
@@ -125,7 +125,7 @@ class UserAvatar extends StatelessWidget {
), ),
child: Material( child: Material(
shape: const CircleBorder(), shape: const CircleBorder(),
color: streamChatTheme.colorTheme.accentGreen, color: streamChatTheme.colorTheme.accentInfo,
), ),
), ),
), ),
@@ -75,7 +75,7 @@ class UserItem extends StatelessWidget {
), ),
trailing: selected trailing: selected
? StreamSvgIcon.checkSend( ? StreamSvgIcon.checkSend(
color: chatThemeData.colorTheme.accentBlue, color: chatThemeData.colorTheme.accentPrimary,
) )
: null, : null,
title: Text( title: Text(
@@ -92,8 +92,8 @@ class UserItem extends StatelessWidget {
user.online == true user.online == true
? 'Online' ? 'Online'
: 'Last online ${Jiffy(user.lastActive).fromNow()}', : 'Last online ${Jiffy(user.lastActive).fromNow()}',
style: chatTheme.textTheme.footnote style: chatTheme.textTheme.footnote.copyWith(
.copyWith(color: chatTheme.colorTheme.black.withOpacity(.5)), color: chatTheme.colorTheme.textHighEmphasis.withOpacity(.5)),
); );
} }
} }
@@ -285,7 +285,7 @@ class _UserListViewState extends State<UserListView>
final chatThemeData = StreamChatTheme.of(context); final chatThemeData = StreamChatTheme.of(context);
return Container( return Container(
key: ValueKey<String>('HEADER-$header'), key: ValueKey<String>('HEADER-$header'),
color: chatThemeData.colorTheme.black.withOpacity(0.05), color: chatThemeData.colorTheme.textHighEmphasis.withOpacity(0.05),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 6), padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 6),
child: Text( child: Text(
@@ -293,7 +293,7 @@ class _UserListViewState extends State<UserListView>
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14.5, fontSize: 14.5,
color: chatThemeData.colorTheme.grey, color: chatThemeData.colorTheme.textLowEmphasis,
), ),
), ),
), ),
@@ -385,7 +385,7 @@ class _UserListViewState extends State<UserListView>
return Container( return Container(
color: StreamChatTheme.of(context) color: StreamChatTheme.of(context)
.colorTheme .colorTheme
.accentRed .accentError
.withOpacity(.2), .withOpacity(.2),
child: const Padding( child: const Padding(
padding: EdgeInsets.symmetric(vertical: 16), padding: EdgeInsets.symmetric(vertical: 16),
@@ -408,6 +408,6 @@ class _UserListViewState extends State<UserListView>
Widget _separatorBuilder(context, i) => Container( Widget _separatorBuilder(context, i) => Container(
height: 1, height: 1,
color: StreamChatTheme.of(context).colorTheme.greyWhisper, color: StreamChatTheme.of(context).colorTheme.borders,
); );
} }
@@ -31,7 +31,7 @@ Future<bool?> showConfirmationDialog(
final chatThemeData = StreamChatTheme.of(context); final chatThemeData = StreamChatTheme.of(context);
return showModalBottomSheet( return showModalBottomSheet(
useRootNavigator: false, useRootNavigator: false,
backgroundColor: chatThemeData.colorTheme.white, backgroundColor: chatThemeData.colorTheme.barsBg,
context: context, context: context,
shape: const RoundedRectangleBorder( shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@@ -75,7 +75,7 @@ Future<bool?> showConfirmationDialog(
child: Text( child: Text(
cancelText, cancelText,
style: chatThemeData.textTheme.bodyBold.copyWith( style: chatThemeData.textTheme.bodyBold.copyWith(
color: chatThemeData.colorTheme.black color: chatThemeData.colorTheme.textHighEmphasis
.withOpacity(0.5)), .withOpacity(0.5)),
), ),
), ),
@@ -91,7 +91,7 @@ Future<bool?> showConfirmationDialog(
child: Text( child: Text(
okText, okText,
style: chatThemeData.textTheme.bodyBold.copyWith( style: chatThemeData.textTheme.bodyBold.copyWith(
color: chatThemeData.colorTheme.accentRed), color: chatThemeData.colorTheme.accentError),
), ),
), ),
), ),
@@ -116,7 +116,8 @@ Future<bool?> showInfoDialog(
final chatThemeData = StreamChatTheme.of(context); final chatThemeData = StreamChatTheme.of(context);
return showModalBottomSheet( return showModalBottomSheet(
useRootNavigator: false, useRootNavigator: false,
backgroundColor: theme?.colorTheme.white ?? chatThemeData.colorTheme.white, backgroundColor:
theme?.colorTheme.barsBg ?? chatThemeData.colorTheme.barsBg,
context: context, context: context,
shape: const RoundedRectangleBorder( shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@@ -147,8 +148,8 @@ Future<bool?> showInfoDialog(
height: 36, height: 36,
), ),
Container( Container(
color: theme?.colorTheme.black.withOpacity(.08) ?? color: theme?.colorTheme.textHighEmphasis.withOpacity(.08) ??
chatThemeData.colorTheme.black.withOpacity(.08), chatThemeData.colorTheme.textHighEmphasis.withOpacity(.08),
height: 1, height: 1,
), ),
Center( Center(
@@ -159,8 +160,8 @@ Future<bool?> showInfoDialog(
child: Text( child: Text(
okText, okText,
style: TextStyle( style: TextStyle(
color: theme?.colorTheme.black.withOpacity(0.5) ?? color: theme?.colorTheme.textHighEmphasis.withOpacity(0.5) ??
chatThemeData.colorTheme.accentBlue, chatThemeData.colorTheme.accentPrimary,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
), ),
@@ -94,8 +94,8 @@ class _VideoThumbnailImageState extends State<VideoThumbnailImage> {
constraints: const BoxConstraints.expand(), constraints: const BoxConstraints.expand(),
child: widget.placeholderBuilder?.call(context) ?? child: widget.placeholderBuilder?.call(context) ??
Shimmer.fromColors( Shimmer.fromColors(
baseColor: _streamChatTheme.colorTheme.greyGainsboro, baseColor: _streamChatTheme.colorTheme.disabled,
highlightColor: _streamChatTheme.colorTheme.whiteSmoke, highlightColor: _streamChatTheme.colorTheme.inputBg,
child: Image.asset( child: Image.asset(
'images/placeholder.png', 'images/placeholder.png',
fit: BoxFit.cover, fit: BoxFit.cover,
@@ -203,9 +203,9 @@ class _MessageScreenState extends State<MessageScreen> {
final channel = StreamChannel.of(context).channel; final channel = StreamChannel.of(context).channel;
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: StreamBuilder<List<User>>( title: StreamBuilder<Iterable<User>>(
initialData: channel.state?.typingEvents, initialData: channel.state?.typingEvents.keys,
stream: channel.state?.typingEventsStream, stream: channel.state?.typingEventsStream.map((it) => it.keys),
builder: (context, snapshot) { builder: (context, snapshot) {
if (snapshot.hasData && snapshot.data!.isNotEmpty) { if (snapshot.hasData && snapshot.data!.isNotEmpty) {
return Text('${snapshot.data!.first.name} is typing...'); return Text('${snapshot.data!.first.name} is typing...');
@@ -344,7 +344,7 @@ extension on Channel {
String? get name { String? get name {
final _channelName = extraData['name']; final _channelName = extraData['name'];
if (_channelName != null) { if (_channelName != null) {
return _channelName; return _channelName as String;
} else { } else {
return cid; return cid;
} }