Merge branch 'develop' into fix/onReply-in-attachment-action-modal
This commit is contained in:
@@ -1,8 +1,15 @@
|
|||||||
## Upcomming
|
## Upcomming
|
||||||
|
|
||||||
|
🔄 Changed
|
||||||
|
|
||||||
|
- Updated `lottie` dependency to `^2.0.0`
|
||||||
|
- Updated `desktop_drop` dependency to `^0.4.0`
|
||||||
|
- Updated `connectivity_plus` dependency to `^3.0.2`
|
||||||
|
|
||||||
🐞 Fixed
|
🐞 Fixed
|
||||||
|
- [[#1379]](https://github.com/GetStream/stream-chat-flutter/issues/1379) Fixed "Issues with photo attachments on web", where the cached image attachment would not render while uploading.
|
||||||
- Fix render overflow issue with `MessageSearchListTileTitle`. It now uses `Text.rich` instead of `Row`. Better default behaviour and allows `TextOverflow`.
|
- Fix render overflow issue with `MessageSearchListTileTitle`. It now uses `Text.rich` instead of `Row`. Better default behaviour and allows `TextOverflow`.
|
||||||
- Fix [[#1347]](https://github.com/GetStream/stream-chat-flutter/issues/1347) `onReply` not working in `AttachmentActionsModal` which is used by `StreamImageAttachment` and `StreamImageGroup`.
|
- [[#1347]](https://github.com/GetStream/stream-chat-flutter/issues/1347) `onReply` not working in `AttachmentActionsModal` which is used by `StreamImageAttachment` and `StreamImageGroup`.
|
||||||
|
|
||||||
## 5.1.0
|
## 5.1.0
|
||||||
|
|
||||||
|
|||||||
@@ -56,22 +56,33 @@ class StreamImageAttachment extends StreamAttachmentWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return source.when(
|
return source.when(
|
||||||
local: () {
|
local: () {
|
||||||
if (attachment.localUri == null || attachment.file?.bytes == null) {
|
if (attachment.file?.bytes != null) {
|
||||||
return AttachmentError(constraints: constraints);
|
return _buildImageAttachment(
|
||||||
}
|
context,
|
||||||
return _buildImageAttachment(
|
Image.memory(
|
||||||
context,
|
attachment.file!.bytes!,
|
||||||
Image.memory(
|
height: constraints?.maxHeight,
|
||||||
attachment.file!.bytes!,
|
width: constraints?.maxWidth,
|
||||||
height: constraints?.maxHeight,
|
fit: BoxFit.cover,
|
||||||
width: constraints?.maxWidth,
|
errorBuilder: _imageErrorBuilder,
|
||||||
fit: BoxFit.cover,
|
|
||||||
errorBuilder: (context, _, __) => Image.asset(
|
|
||||||
'images/placeholder.png',
|
|
||||||
package: 'stream_chat_flutter',
|
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
);
|
} else if (attachment.localUri != null) {
|
||||||
|
return _buildImageAttachment(
|
||||||
|
context,
|
||||||
|
Image.asset(
|
||||||
|
attachment.localUri!.path,
|
||||||
|
height: constraints?.maxHeight,
|
||||||
|
width: constraints?.maxWidth,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
errorBuilder: _imageErrorBuilder,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return AttachmentError(
|
||||||
|
constraints: constraints,
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
network: () {
|
network: () {
|
||||||
var imageUrl =
|
var imageUrl =
|
||||||
@@ -116,6 +127,12 @@ class StreamImageAttachment extends StreamAttachmentWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _imageErrorBuilder(BuildContext _, Object __, StackTrace? ___) =>
|
||||||
|
Image.asset(
|
||||||
|
'images/placeholder.png',
|
||||||
|
package: 'stream_chat_flutter',
|
||||||
|
);
|
||||||
|
|
||||||
Widget _buildImageAttachment(BuildContext context, Widget imageWidget) {
|
Widget _buildImageAttachment(BuildContext context, Widget imageWidget) {
|
||||||
return Container(
|
return Container(
|
||||||
constraints: constraints,
|
constraints: constraints,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ dependencies:
|
|||||||
collection: ^1.15.0
|
collection: ^1.15.0
|
||||||
contextmenu: ^3.0.0
|
contextmenu: ^3.0.0
|
||||||
dart_vlc: ^0.3.0
|
dart_vlc: ^0.3.0
|
||||||
desktop_drop: ^0.3.3
|
desktop_drop: ^0.4.0
|
||||||
diacritic: ^0.1.3
|
diacritic: ^0.1.3
|
||||||
dio: ^4.0.6
|
dio: ^4.0.6
|
||||||
ezanimation: ^0.6.0
|
ezanimation: ^0.6.0
|
||||||
@@ -31,7 +31,7 @@ dependencies:
|
|||||||
image_gallery_saver: ^1.7.0
|
image_gallery_saver: ^1.7.0
|
||||||
image_picker: ^0.8.2
|
image_picker: ^0.8.2
|
||||||
jiffy: ^5.0.0
|
jiffy: ^5.0.0
|
||||||
lottie: ^1.0.1
|
lottie: ^2.0.0
|
||||||
meta: ^1.3.0
|
meta: ^1.3.0
|
||||||
path_provider: ^2.0.9
|
path_provider: ^2.0.9
|
||||||
photo_manager: ^2.0.1
|
photo_manager: ^2.0.1
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
## Upcomming
|
||||||
|
|
||||||
|
🔄 Changed
|
||||||
|
|
||||||
|
- Updated `connectivity_plus` dependency to `^3.0.2`
|
||||||
|
|
||||||
## 5.1.0
|
## 5.1.0
|
||||||
|
|
||||||
- Deprecated the `sort` parameter in the `StreamChannelListController` in favor of `channelStateSort`.
|
- Deprecated the `sort` parameter in the `StreamChannelListController` in favor of `channelStateSort`.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ environment:
|
|||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
collection: ^1.15.0
|
collection: ^1.15.0
|
||||||
connectivity_plus: ^2.1.0
|
connectivity_plus: ^3.0.2
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
freezed_annotation: ^2.0.3
|
freezed_annotation: ^2.0.3
|
||||||
|
|||||||
Reference in New Issue
Block a user