fix review

This commit is contained in:
Salvatore Giordano
2021-04-30 15:00:51 +02:00
parent 0d12e701a0
commit 5bbe82c7eb
25 changed files with 141 additions and 143 deletions
@@ -204,7 +204,8 @@ class Channel {
/// Channel extra data as a stream
Stream<Map<String, dynamic>> get extraDataStream {
_checkInitialized();
return state!.channelStateStream.map(
return state!.channelStateStream
.map(
(cs) => cs.channel?.extraData ?? _extraData,
);
}
@@ -11,7 +11,7 @@ class AttachmentTitle extends StatelessWidget {
required this.messageTheme,
}) : super(key: key);
final MessageTheme? messageTheme;
final MessageTheme messageTheme;
final Attachment attachment;
@override
@@ -32,7 +32,7 @@ class AttachmentTitle extends StatelessWidget {
Text(
attachment.title!,
overflow: TextOverflow.ellipsis,
style: messageTheme?.messageText?.copyWith(
style: messageTheme.messageText?.copyWith(
color: StreamChatTheme.of(context).colorTheme.accentBlue,
fontWeight: FontWeight.bold,
),
@@ -47,7 +47,7 @@ class AttachmentTitle extends StatelessWidget {
.toList()
.reversed
.join('.'),
style: messageTheme?.messageText,
style: messageTheme.messageText,
),
],
),
@@ -155,7 +155,7 @@ class FileAttachment extends AttachmentWidget {
shape: _getDefaultShape(context),
child: source.when(
local: () => VideoThumbnailImage(
video: attachment.file?.path,
video: attachment.file!.path!,
placeholderBuilder: (_) {
return Center(
child: Container(
@@ -167,7 +167,7 @@ class FileAttachment extends AttachmentWidget {
},
),
network: () => VideoThumbnailImage(
video: attachment.assetUrl,
video: attachment.assetUrl!,
placeholderBuilder: (_) {
return Center(
child: Container(
@@ -10,7 +10,7 @@ import 'attachment_title.dart';
import 'attachment_widget.dart';
class ImageAttachment extends AttachmentWidget {
final MessageTheme? messageTheme;
final MessageTheme messageTheme;
final bool showTitle;
final ShowMessageCallback? onShowMessage;
final ValueChanged<ReturnActionType>? onReturnAction;
@@ -20,8 +20,8 @@ class ImageAttachment extends AttachmentWidget {
Key? key,
required Message message,
required Attachment attachment,
required this.messageTheme,
Size? size,
this.messageTheme,
this.showTitle = false,
this.onShowMessage,
this.onReturnAction,
@@ -157,7 +157,7 @@ class ImageAttachment extends AttachmentWidget {
),
if (showTitle && attachment.title != null)
Material(
color: messageTheme?.messageBackgroundColor,
color: messageTheme.messageBackgroundColor,
child: AttachmentTitle(
messageTheme: messageTheme,
attachment: attachment,
@@ -8,7 +8,7 @@ import 'attachment_upload_state_builder.dart';
import 'attachment_widget.dart';
class VideoAttachment extends AttachmentWidget {
final MessageTheme? messageTheme;
final MessageTheme messageTheme;
final ShowMessageCallback? onShowMessage;
final ValueChanged<ReturnActionType>? onReturnAction;
final VoidCallback? onAttachmentTap;
@@ -17,8 +17,8 @@ class VideoAttachment extends AttachmentWidget {
Key? key,
required Message message,
required Attachment attachment,
required this.messageTheme,
Size? size,
this.messageTheme,
this.onShowMessage,
this.onReturnAction,
this.onAttachmentTap,
@@ -39,7 +39,7 @@ class VideoAttachment extends AttachmentWidget {
return _buildVideoAttachment(
context,
VideoThumbnailImage(
video: attachment.file?.path,
video: attachment.file!.path!,
height: size?.height,
width: size?.width,
fit: BoxFit.cover,
@@ -54,7 +54,7 @@ class VideoAttachment extends AttachmentWidget {
return _buildVideoAttachment(
context,
VideoThumbnailImage(
video: attachment.assetUrl,
video: attachment.assetUrl!,
height: size?.height,
width: size?.width,
fit: BoxFit.cover,
@@ -116,7 +116,7 @@ class VideoAttachment extends AttachmentWidget {
),
if (attachment.title != null)
Material(
color: messageTheme?.messageBackgroundColor,
color: messageTheme.messageBackgroundColor,
child: AttachmentTitle(
messageTheme: messageTheme,
attachment: attachment,
@@ -14,7 +14,7 @@ class DeletedMessage extends StatelessWidget {
}) : super(key: key);
/// The theme of the message
final MessageTheme? messageTheme;
final MessageTheme messageTheme;
/// The border radius of the message text
final BorderRadiusGeometry? borderRadiusGeometry;
@@ -34,7 +34,7 @@ class DeletedMessage extends StatelessWidget {
transform: Matrix4.rotationY(reverse ? pi : 0),
alignment: Alignment.center,
child: Material(
color: messageTheme?.messageBackgroundColor,
color: messageTheme.messageBackgroundColor,
shape: shape ??
RoundedRectangleBorder(
borderRadius: borderRadiusGeometry ?? BorderRadius.zero,
@@ -61,9 +61,9 @@ class DeletedMessage extends StatelessWidget {
alignment: Alignment.center,
child: Text(
'Message deleted',
style: messageTheme?.messageText?.copyWith(
style: messageTheme.messageText?.copyWith(
fontStyle: FontStyle.italic,
color: messageTheme?.createdAt?.color,
color: messageTheme.createdAt?.color,
),
),
),
@@ -177,7 +177,6 @@ class _FullScreenMediaState extends State<FullScreenMedia>
Navigator.of(context).pop();
},
message: widget.message,
urls: widget.mediaAttachments,
currentIndex: _currentPage,
onShowMessage: () {
widget.onShowMessage?.call(
@@ -221,8 +221,8 @@ class _ImageFooterState extends State<ImageFooter> {
child: FittedBox(
fit: BoxFit.cover,
child: VideoThumbnailImage(
video: attachment.file?.path ??
attachment.assetUrl,
video: (attachment.file?.path ??
attachment.assetUrl)!,
),
),
);
@@ -15,7 +15,7 @@ class ImageGroup extends StatelessWidget {
final List<Attachment> images;
final Message message;
final MessageTheme? messageTheme;
final MessageTheme messageTheme;
final Size size;
final ShowMessageCallback? onShowMessage;
@@ -27,15 +27,13 @@ class ImageHeader extends StatelessWidget implements PreferredSizeWidget {
final String userName;
final String sentAt;
final List<Attachment> urls;
final currentIndex;
final int currentIndex;
/// Creates a channel header
ImageHeader({
Key? key,
required this.message,
this.urls = const [],
this.currentIndex,
this.currentIndex = 0,
this.showBackButton = true,
this.onBackPressed,
this.onShowMessage,
@@ -20,7 +20,7 @@ class MessageActionsModal extends StatefulWidget {
final OnMessageTap? onThreadReplyTap;
final OnMessageTap? onReplyTap;
final Message message;
final MessageTheme? messageTheme;
final MessageTheme messageTheme;
final bool showReactions;
final OnMessageTap? onCopyTap;
final bool showDeleteMessage;
@@ -92,7 +92,7 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
}
}
final roughSentenceSize = messageTextLength *
(widget.messageTheme?.messageText?.fontSize ?? 1) *
(widget.messageTheme.messageText?.fontSize ?? 1) *
1.2;
final divFactor = widget.message.attachments.isNotEmpty == true
? 1
@@ -149,7 +149,6 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
0.0),
child: ReactionPicker(
message: widget.message,
messageTheme: widget.messageTheme,
),
),
SizedBox(height: 8),
@@ -1661,7 +1661,7 @@ class MessageInputState extends State<MessageInput> {
VideoThumbnailImage(
height: 104,
width: 104,
video: attachment.file?.path ?? attachment.assetUrl,
video: (attachment.file?.path ?? attachment.assetUrl)!,
fit: BoxFit.cover,
),
Positioned(
@@ -832,7 +832,7 @@ class _MessageListViewState extends State<MessageListView> {
break;
case ReturnActionType.reply:
FocusScope.of(context).unfocus();
widget.onMessageSwiped!(message);
widget.onMessageSwiped?.call(message);
break;
}
},
@@ -1008,7 +1008,7 @@ class _MessageListViewState extends State<MessageListView> {
break;
case ReturnActionType.reply:
FocusScope.of(context).unfocus();
widget.onMessageSwiped!(message);
widget.onMessageSwiped?.call(message);
break;
}
},
@@ -1034,7 +1034,7 @@ class _MessageListViewState extends State<MessageListView> {
child: Swipeable(
onSwipeEnd: () {
FocusScope.of(context).unfocus();
widget.onMessageSwiped!(message);
widget.onMessageSwiped?.call(message);
},
backgroundIcon: StreamSvgIcon.reply(
color: StreamChatTheme.of(context).colorTheme.accentBlue,
@@ -14,7 +14,7 @@ import 'stream_chat_theme.dart';
class MessageReactionsModal extends StatelessWidget {
final Message message;
final MessageTheme? messageTheme;
final MessageTheme messageTheme;
final bool reverse;
final bool showReactions;
final DisplayWidget showUserAvatar;
@@ -53,7 +53,7 @@ class MessageReactionsModal extends StatelessWidget {
}
}
final roughSentenceSize =
messageTextLength * (messageTheme?.messageText?.fontSize ?? 1) * 1.2;
messageTextLength * (messageTheme.messageText?.fontSize ?? 1) * 1.2;
final divFactor = message.attachments.isNotEmpty == true
? 1
: (roughSentenceSize == 0 ? 1 : (roughSentenceSize / roughMaxSize));
@@ -105,7 +105,6 @@ class MessageReactionsModal extends StatelessWidget {
0.0),
child: ReactionPicker(
message: message,
messageTheme: messageTheme,
),
),
const SizedBox(height: 8),
@@ -244,9 +243,9 @@ class MessageReactionsModal extends StatelessWidget {
child: ReactionBubble(
reactions: [reaction],
flipTail: !reverse,
borderColor: messageTheme?.reactionsBorderColor ??
Colors.transparent,
backgroundColor: messageTheme?.reactionsBackgroundColor ??
borderColor:
messageTheme.reactionsBorderColor ?? Colors.transparent,
backgroundColor: messageTheme.reactionsBackgroundColor ??
Colors.transparent,
maskColor: StreamChatTheme.of(context).colorTheme.white,
tailCirclesSpacing: 1,
@@ -18,11 +18,11 @@ class MessageText extends StatelessWidget {
final Message message;
final void Function(User)? onMentionTap;
final void Function(String)? onLinkTap;
final MessageTheme? messageTheme;
final MessageTheme messageTheme;
@override
Widget build(BuildContext context) {
final text = _replaceMentions(message.text)!.replaceAll('\n', '\\\n');
final text = _replaceMentions(message.text ?? '').replaceAll('\n', '\\\n');
return MarkdownBody(
data: text,
@@ -55,23 +55,23 @@ class MessageText extends StatelessWidget {
styleSheet: MarkdownStyleSheet.fromTheme(
Theme.of(context).copyWith(
textTheme: Theme.of(context).textTheme.apply(
bodyColor: messageTheme!.messageText!.color,
decoration: messageTheme!.messageText!.decoration,
decorationColor: messageTheme!.messageText!.decorationColor,
decorationStyle: messageTheme!.messageText!.decorationStyle,
fontFamily: messageTheme!.messageText!.fontFamily,
bodyColor: messageTheme.messageText?.color,
decoration: messageTheme.messageText?.decoration,
decorationColor: messageTheme.messageText?.decorationColor,
decorationStyle: messageTheme.messageText?.decorationStyle,
fontFamily: messageTheme.messageText?.fontFamily,
),
),
).copyWith(
a: messageTheme!.messageLinks,
p: messageTheme!.messageText,
a: messageTheme.messageLinks,
p: messageTheme.messageText,
),
);
}
String? _replaceMentions(String? text) {
String _replaceMentions(String text) {
message.mentionedUsers.map((u) => u.name).toSet().forEach((userName) {
text = text!.replaceAll(
text = text.replaceAll(
'@$userName', '[@$userName](@${userName.replaceAll(' ', '')})');
});
return text;
@@ -66,7 +66,7 @@ class MessageWidget extends StatefulWidget {
final Message message;
/// The message theme
final MessageTheme? messageTheme;
final MessageTheme messageTheme;
/// If true the widget will be mirrored
final bool reverse;
@@ -93,7 +93,7 @@ class MessageWidget extends StatefulWidget {
final EdgeInsetsGeometry? padding;
/// The internal padding of the message text
final EdgeInsetsGeometry textPadding;
final EdgeInsets textPadding;
/// The internal padding of an attachment
final EdgeInsetsGeometry attachmentPadding;
@@ -222,7 +222,7 @@ class MessageWidget extends StatefulWidget {
child: wrapAttachmentWidget(
context,
Material(
color: messageTheme?.messageBackgroundColor,
color: messageTheme.messageBackgroundColor,
child: ImageGroup(
size: Size(
MediaQuery.of(context).size.width * 0.8,
@@ -425,7 +425,7 @@ class _MessageWidgetState extends State<MessageWidget>
Widget build(BuildContext context) {
super.build(context);
final avatarWidth =
widget.messageTheme?.avatarTheme?.constraints.maxWidth ?? 40;
widget.messageTheme.avatarTheme?.constraints.maxWidth ?? 40;
var leftPadding =
widget.showUserAvatar != DisplayWidget.gone ? avatarWidth + 8.5 : 0.5;
@@ -544,7 +544,7 @@ class _MessageWidgetState extends State<MessageWidget>
BorderSide(
color: widget
.messageTheme
?.messageBorderColor ??
.messageBorderColor ??
Colors.grey,
),
borderRadius: widget
@@ -702,7 +702,7 @@ class _MessageWidgetState extends State<MessageWidget>
),
InkWell(
onTap: widget.onThreadTap != null ? onThreadTap : null,
child: Text(msg, style: widget.messageTheme?.replies),
child: Text(msg, style: widget.messageTheme.replies),
),
],
if (showUsername)
@@ -710,13 +710,13 @@ class _MessageWidgetState extends State<MessageWidget>
widget.message.user!.name,
maxLines: 1,
key: usernameKey,
style: widget.messageTheme?.messageAuthor,
style: widget.messageTheme.messageAuthor,
overflow: TextOverflow.ellipsis,
),
if (showTimeStamp)
Text(
Jiffy(widget.message.createdAt.toLocal()).jm,
style: widget.messageTheme?.createdAt,
style: widget.messageTheme.createdAt,
),
if (showSendingIndicator) _buildSendingIndicator(),
]);
@@ -731,13 +731,13 @@ class _MessageWidgetState extends State<MessageWidget>
Container(
margin: EdgeInsets.only(
bottom: context.textScaleFactor *
((widget.messageTheme?.replies?.fontSize ?? 1) / 2),
((widget.messageTheme.replies?.fontSize ?? 1) / 2),
),
child: CustomPaint(
size: Size(16, 32) * context.textScaleFactor,
painter: _ThreadReplyPainter(
context: context,
color: widget.messageTheme?.messageBorderColor,
color: widget.messageTheme.messageBorderColor,
),
),
),
@@ -775,7 +775,7 @@ class _MessageWidgetState extends State<MessageWidget>
return UrlAttachment(
urlAttachment: urlAttachment,
hostDisplayName: hostDisplayName,
textPadding: widget.textPadding as EdgeInsets,
textPadding: widget.textPadding,
);
}
@@ -830,12 +830,11 @@ class _MessageWidgetState extends State<MessageWidget>
key: ValueKey('${widget.message.id}.reactions'),
reverse: widget.reverse,
flipTail: widget.reverse,
backgroundColor:
widget.messageTheme?.reactionsBackgroundColor ??
Colors.transparent,
borderColor: widget.messageTheme?.reactionsBorderColor ??
backgroundColor: widget.messageTheme.reactionsBackgroundColor ??
Colors.transparent,
maskColor: widget.messageTheme?.reactionsMaskColor ??
borderColor: widget.messageTheme.reactionsBorderColor ??
Colors.transparent,
maskColor: widget.messageTheme.reactionsMaskColor ??
Colors.transparent,
reactions: reactionsList,
),
@@ -1001,7 +1000,7 @@ class _MessageWidgetState extends State<MessageWidget>
}
Widget _buildSendingIndicator() {
final style = widget.messageTheme?.createdAt;
final style = widget.messageTheme.createdAt;
final message = widget.message;
if (hasNonUrlAttachments &&
@@ -1053,7 +1052,7 @@ class _MessageWidgetState extends State<MessageWidget>
offset: Offset(
0,
widget.translateUserAvatar
? (widget.messageTheme?.avatarTheme?.constraints.maxHeight ??
? (widget.messageTheme.avatarTheme?.constraints.maxHeight ??
40) /
2
: 0,
@@ -1061,8 +1060,8 @@ class _MessageWidgetState extends State<MessageWidget>
child: UserAvatar(
user: widget.message.user!,
onTap: widget.onUserAvatarTap,
constraints: widget.messageTheme?.avatarTheme!.constraints,
borderRadius: widget.messageTheme?.avatarTheme!.borderRadius,
constraints: widget.messageTheme.avatarTheme!.constraints,
borderRadius: widget.messageTheme.avatarTheme!.borderRadius,
showOnlineStatus: false,
),
),
@@ -1085,9 +1084,9 @@ class _MessageWidgetState extends State<MessageWidget>
message: widget.message,
onMentionTap: widget.onMentionTap,
messageTheme: isOnlyEmoji
? widget.messageTheme?.copyWith(
? widget.messageTheme.copyWith(
messageText:
widget.messageTheme?.messageText!.copyWith(
widget.messageTheme.messageText!.copyWith(
fontSize: 42,
))
: widget.messageTheme,
@@ -1103,7 +1102,7 @@ class _MessageWidgetState extends State<MessageWidget>
Color? _getBackgroundColor() {
if (hasQuotedMessage) {
return widget.messageTheme?.messageBackgroundColor;
return widget.messageTheme.messageBackgroundColor;
}
if (hasUrlAttachments) {
@@ -1118,7 +1117,7 @@ class _MessageWidgetState extends State<MessageWidget>
return Colors.transparent;
}
return widget.messageTheme?.messageBackgroundColor;
return widget.messageTheme.messageBackgroundColor;
}
void retryMessage(BuildContext context) {
@@ -67,7 +67,7 @@ class QuotedMessageWidget extends StatelessWidget {
final Message message;
/// The message theme
final MessageTheme? messageTheme;
final MessageTheme messageTheme;
/// If true the widget will be mirrored
final bool reverse;
@@ -144,12 +144,12 @@ class QuotedMessageWidget extends StatelessWidget {
child: MessageText(
message: msg,
messageTheme: isOnlyEmoji && _containsText
? messageTheme?.copyWith(
messageText: messageTheme?.messageText?.copyWith(
? messageTheme.copyWith(
messageText: messageTheme.messageText?.copyWith(
fontSize: 32,
))
: messageTheme?.copyWith(
messageText: messageTheme?.messageText?.copyWith(
: messageTheme.copyWith(
messageText: messageTheme.messageText?.copyWith(
fontSize: 12,
)),
),
@@ -310,6 +310,6 @@ class QuotedMessageWidget extends StatelessWidget {
if (_containsScrapeUrl) {
return StreamChatTheme.of(context).colorTheme.blueAlice;
}
return messageTheme?.messageBackgroundColor;
return messageTheme.messageBackgroundColor;
}
}
@@ -18,11 +18,9 @@ class ReactionPicker extends StatefulWidget {
const ReactionPicker({
Key? key,
required this.message,
required this.messageTheme,
}) : super(key: key);
final Message message;
final MessageTheme? messageTheme;
@override
_ReactionPickerState createState() => _ReactionPickerState();
@@ -32,7 +32,7 @@ import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
/// Use [StreamChat.of] to get the current [StreamChatState] instance.
class StreamChat extends StatefulWidget {
final StreamChatClient client;
final Widget? child;
final Widget child;
final StreamChatThemeData? streamChatThemeData;
/// The amount of time that will pass before disconnecting the client in the background
@@ -96,7 +96,7 @@ class StreamChatState extends State<StreamChat> {
client: client,
onBackgroundEventReceived: widget.onBackgroundEventReceived,
backgroundKeepAlive: widget.backgroundKeepAlive,
child: widget.child!,
child: widget.child,
),
);
},
@@ -5,7 +5,7 @@ import 'stream_chat_theme.dart';
class UploadProgressIndicator extends StatelessWidget {
final int uploaded;
final int total;
late final Color progressIndicatorColor;
final Color progressIndicatorColor;
final EdgeInsetsGeometry padding;
final bool showBackground;
final TextStyle? textStyle;
@@ -14,7 +14,7 @@ class UploadProgressIndicator extends StatelessWidget {
Key? key,
required this.uploaded,
required this.total,
Color? progressIndicatorColor,
this.progressIndicatorColor = const Color(0xffb2b2b2),
this.padding = const EdgeInsets.only(
top: 5,
bottom: 5,
@@ -23,9 +23,7 @@ class UploadProgressIndicator extends StatelessWidget {
),
this.showBackground = true,
this.textStyle,
}) : progressIndicatorColor =
progressIndicatorColor ?? const Color(0xffb2b2b2),
super(key: key);
}) : super(key: key);
@override
Widget build(BuildContext context) {
@@ -11,16 +11,21 @@ class UrlAttachment extends StatelessWidget {
UrlAttachment({
required this.urlAttachment,
required this.hostDisplayName,
required this.textPadding,
this.textPadding = const EdgeInsets.symmetric(
horizontal: 16.0,
vertical: 8.0,
),
});
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => launchURL(
context,
urlAttachment.ogScrapeUrl!,
),
onTap: () {
launchURL(
context,
urlAttachment.ogScrapeUrl,
);
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
+33 -31
View File
@@ -22,10 +22,10 @@ Future<void> launchURL(BuildContext context, String? url) async {
Future<bool?> showConfirmationDialog(
BuildContext context, {
String? title,
required String title,
required String okText,
Widget? icon,
String? question,
String? okText,
String? cancelText,
}) {
return showModalBottomSheet(
@@ -46,14 +46,15 @@ Future<bool?> showConfirmationDialog(
if (icon != null) icon,
SizedBox(height: 26.0),
Text(
title!,
title,
style: StreamChatTheme.of(context).textTheme.headlineBold,
),
SizedBox(height: 7.0),
Text(
question!,
textAlign: TextAlign.center,
),
if (question != null)
Text(
question,
textAlign: TextAlign.center,
),
SizedBox(height: 36.0),
Container(
color: effect.color!.withOpacity(effect.alpha ?? 1),
@@ -61,27 +62,28 @@ Future<bool?> showConfirmationDialog(
),
Row(
children: [
Flexible(
child: Container(
alignment: Alignment.center,
child: TextButton(
onPressed: () {
Navigator.of(context).pop(false);
},
child: Text(
cancelText!,
style: StreamChatTheme.of(context)
.textTheme
.bodyBold
.copyWith(
color: StreamChatTheme.of(context)
.colorTheme
.black
.withOpacity(0.5)),
if (cancelText != null)
Flexible(
child: Container(
alignment: Alignment.center,
child: TextButton(
onPressed: () {
Navigator.of(context).pop(false);
},
child: Text(
cancelText,
style: StreamChatTheme.of(context)
.textTheme
.bodyBold
.copyWith(
color: StreamChatTheme.of(context)
.colorTheme
.black
.withOpacity(0.5)),
),
),
),
),
),
Flexible(
child: Container(
alignment: Alignment.center,
@@ -90,7 +92,7 @@ Future<bool?> showConfirmationDialog(
Navigator.pop(context, true);
},
child: Text(
okText!,
okText,
style: StreamChatTheme.of(context)
.textTheme
.bodyBold
@@ -112,10 +114,10 @@ Future<bool?> showConfirmationDialog(
Future<bool?> showInfoDialog(
BuildContext context, {
String? title,
required String title,
required String okText,
Widget? icon,
String? details,
String? okText,
StreamChatThemeData? theme,
}) {
return showModalBottomSheet(
@@ -140,14 +142,14 @@ Future<bool?> showInfoDialog(
height: 26.0,
),
Text(
title!,
title,
style: theme?.textTheme.headlineBold ??
StreamChatTheme.of(context).textTheme.headlineBold,
),
SizedBox(
height: 7.0,
),
Text(details!),
if (details != null) Text(details),
SizedBox(
height: 36.0,
),
@@ -162,7 +164,7 @@ Future<bool?> showInfoDialog(
Navigator.of(context).pop();
},
child: Text(
okText!,
okText,
style: TextStyle(
color: theme?.colorTheme.black.withOpacity(0.5) ??
StreamChatTheme.of(context).colorTheme.accentBlue,
@@ -9,7 +9,7 @@ import 'stream_svg_icon.dart';
import 'video_service.dart';
class VideoThumbnailImage extends StatefulWidget {
final String? video;
final String video;
final double? width;
final double? height;
final BoxFit? fit;
@@ -38,7 +38,7 @@ class _VideoThumbnailImageState extends State<VideoThumbnailImage> {
@override
void initState() {
thumbnailFuture = VideoService.generateVideoThumbnail(
video: widget.video!,
video: widget.video,
imageFormat: widget.format,
);
super.initState();
@@ -48,7 +48,7 @@ class _VideoThumbnailImageState extends State<VideoThumbnailImage> {
void didUpdateWidget(covariant VideoThumbnailImage oldWidget) {
if (oldWidget.video != widget.video || oldWidget.format != widget.format) {
thumbnailFuture = VideoService.generateVideoThumbnail(
video: widget.video!,
video: widget.video,
imageFormat: widget.format,
);
}
@@ -278,7 +278,7 @@ void main() {
builder: (context, child) {
return StreamChat(
client: client,
child: child,
child: child!,
);
},
home: StreamChannel(
@@ -331,7 +331,7 @@ void main() {
builder: (context, child) {
return StreamChat(
client: client,
child: child,
child: child!,
);
},
home: StreamChannel(
@@ -381,7 +381,7 @@ void main() {
builder: (context, child) {
return StreamChat(
client: client,
child: child,
child: child!,
);
},
home: StreamChannel(
@@ -415,7 +415,7 @@ void main() {
builder: (context, child) {
return StreamChat(
client: client,
child: child,
child: child!,
);
},
home: Container(
@@ -472,7 +472,7 @@ void main() {
builder: (context, child) {
return StreamChat(
client: client,
child: child,
child: child!,
);
},
home: Container(
@@ -264,7 +264,7 @@ void main() {
return StreamChat(
client: client,
streamChatThemeData: streamTheme,
child: child,
child: child!,
);
},
theme: themeData,
@@ -314,7 +314,7 @@ void main() {
return StreamChat(
client: client,
streamChatThemeData: streamTheme,
child: child,
child: child!,
);
},
theme: themeData,
@@ -369,7 +369,7 @@ void main() {
return StreamChat(
client: client,
streamChatThemeData: streamTheme,
child: child,
child: child!,
);
},
theme: themeData,
@@ -420,7 +420,7 @@ void main() {
return StreamChat(
client: client,
streamChatThemeData: streamTheme,
child: child,
child: child!,
);
},
theme: themeData,
@@ -471,7 +471,7 @@ void main() {
return StreamChat(
client: client,
streamChatThemeData: streamTheme,
child: child,
child: child!,
);
},
theme: themeData,
@@ -520,7 +520,7 @@ void main() {
return StreamChat(
client: client,
streamChatThemeData: streamTheme,
child: child,
child: child!,
);
},
theme: themeData,
@@ -579,7 +579,7 @@ void main() {
return StreamChat(
client: client,
streamChatThemeData: streamTheme,
child: child,
child: child!,
);
},
theme: themeData,
@@ -638,7 +638,7 @@ void main() {
return StreamChat(
client: client,
streamChatThemeData: streamTheme,
child: child,
child: child!,
);
},
theme: themeData,
@@ -693,7 +693,7 @@ void main() {
return StreamChat(
client: client,
streamChatThemeData: streamTheme,
child: child,
child: child!,
);
},
theme: themeData,
@@ -752,7 +752,7 @@ void main() {
return StreamChat(
client: client,
streamChatThemeData: streamTheme,
child: child,
child: child!,
);
},
theme: themeData,