solved a couple of analysis issues
This commit is contained in:
@@ -209,7 +209,7 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
|
||||
);
|
||||
}
|
||||
|
||||
void _showDeleteDialog() async {
|
||||
Future<void> _showDeleteDialog() async {
|
||||
final res = await showConfirmationDialog(
|
||||
context,
|
||||
title: 'Delete Conversation',
|
||||
@@ -227,7 +227,7 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
|
||||
}
|
||||
}
|
||||
|
||||
void _showLeaveDialog() async {
|
||||
Future<void> _showLeaveDialog() async {
|
||||
final res = await showConfirmationDialog(
|
||||
context,
|
||||
title: 'Leave conversation',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:synchronized/synchronized.dart';
|
||||
import 'package:video_compress/video_compress.dart';
|
||||
|
||||
@@ -16,5 +17,5 @@ class ICompressVideoService {
|
||||
}
|
||||
}
|
||||
|
||||
ICompressVideoService get CompressVideoService =>
|
||||
ICompressVideoService get compressVideoService =>
|
||||
ICompressVideoService.instance;
|
||||
|
||||
@@ -158,7 +158,7 @@ class _MediaListViewState extends State<MediaListView> {
|
||||
|
||||
final media = await assetList.getAssetListPaged(_currentPage, 50);
|
||||
|
||||
if (!media.isEmpty) {
|
||||
if (media.isNotEmpty) {
|
||||
setState(() {
|
||||
_media.addAll(media);
|
||||
});
|
||||
|
||||
@@ -13,13 +13,13 @@ import 'package:http_parser/http_parser.dart' as httpParser;
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:mime/mime.dart';
|
||||
import 'package:photo_manager/photo_manager.dart';
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
import 'package:stream_chat_flutter/src/compress_video_service.dart';
|
||||
import 'package:stream_chat_flutter/src/media_list_view.dart';
|
||||
import 'package:stream_chat_flutter/src/message_list_view.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_chat_theme.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_svg_icon.dart';
|
||||
import 'package:stream_chat_flutter/src/user_avatar.dart';
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
import 'package:substring_highlight/substring_highlight.dart';
|
||||
import 'package:video_compress/video_compress.dart';
|
||||
|
||||
@@ -1040,7 +1040,7 @@ class MessageInputState extends State<MessageInput> {
|
||||
|
||||
if (file.size > _kMaxAttachmentSize) {
|
||||
if (medium?.type == AssetType.video) {
|
||||
final mediaInfo = await CompressVideoService.compressVideo(file.path);
|
||||
final mediaInfo = await compressVideoService.compressVideo(file.path);
|
||||
|
||||
if (mediaInfo.filesize / (1024 * 1024) > _kMaxAttachmentSize) {
|
||||
_showErrorAlert(
|
||||
@@ -1999,7 +1999,7 @@ class MessageInputState extends State<MessageInput> {
|
||||
|
||||
if (file.size / 1024 > _kMaxAttachmentSize) {
|
||||
if (attachmentType == 'video') {
|
||||
final mediaInfo = await CompressVideoService.compressVideo(file.path);
|
||||
final mediaInfo = await compressVideoService.compressVideo(file.path);
|
||||
file = PlatformFile(
|
||||
name: mediaInfo.title,
|
||||
size: (mediaInfo.filesize / 1024).ceil(),
|
||||
@@ -2424,5 +2424,12 @@ class Tuple2<T1, T2> {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
other is Tuple2 && other.item1 == item1 && other.item2 == item2;
|
||||
identical(this, other) ||
|
||||
other is Tuple2 &&
|
||||
runtimeType == other.runtimeType &&
|
||||
item1 == other.item1 &&
|
||||
item2 == other.item2;
|
||||
|
||||
@override
|
||||
int get hashCode => item1.hashCode ^ item2.hashCode;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ class MessageText extends StatelessWidget {
|
||||
String _replaceMentions(String text) {
|
||||
message.mentionedUsers?.map((u) => u.name)?.toSet()?.forEach((userName) {
|
||||
text = text.replaceAll(
|
||||
'@${userName}', '[@${userName}](@${userName.replaceAll(' ', '')})');
|
||||
'@$userName', '[@$userName](@${userName.replaceAll(' ', '')})');
|
||||
});
|
||||
return text;
|
||||
}
|
||||
|
||||
@@ -37,11 +37,10 @@ dependencies:
|
||||
lottie: ^0.7.0+1
|
||||
substring_highlight: ^0.1.2
|
||||
flutter_slidable: ^0.5.7
|
||||
carousel_slider: ^2.3.1
|
||||
clipboard: ^0.1.2+8
|
||||
image_gallery_saver: ^1.6.7
|
||||
esys_flutter_share: ^1.0.2
|
||||
photo_manager: ^0.5.8
|
||||
photo_manager: ^0.6.0
|
||||
transparent_image: ^1.0.0
|
||||
ezanimation: ^0.4.1
|
||||
synchronized: ^2.2.0+2
|
||||
|
||||
Reference in New Issue
Block a user