Merge pull request #624 from jiahan-wu/jiahan-wu-patch-1
This commit is contained in:
@@ -42,6 +42,10 @@ breakdown:
|
|||||||
* `MessageTheme` is now `MessageThemeData`
|
* `MessageTheme` is now `MessageThemeData`
|
||||||
* `UserListViewTheme` is now `UserListViewThemeData`
|
* `UserListViewTheme` is now `UserListViewThemeData`
|
||||||
|
|
||||||
|
🐞 Fixed
|
||||||
|
|
||||||
|
- Fixed `MessageInput` textField case where `input` is not enabled if the file picked from the camera is null.
|
||||||
|
|
||||||
## 2.1.2
|
## 2.1.2
|
||||||
|
|
||||||
🐞 Fixed
|
🐞 Fixed
|
||||||
|
|||||||
@@ -1898,15 +1898,14 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
} else if (fileType == DefaultAttachmentTypes.video) {
|
} else if (fileType == DefaultAttachmentTypes.video) {
|
||||||
pickedFile = await _imagePicker.pickVideo(source: ImageSource.camera);
|
pickedFile = await _imagePicker.pickVideo(source: ImageSource.camera);
|
||||||
}
|
}
|
||||||
if (pickedFile == null) {
|
if (pickedFile != null) {
|
||||||
return;
|
final bytes = await pickedFile.readAsBytes();
|
||||||
|
file = AttachmentFile(
|
||||||
|
size: bytes.length,
|
||||||
|
path: pickedFile.path,
|
||||||
|
bytes: bytes,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
final bytes = await pickedFile.readAsBytes();
|
|
||||||
file = AttachmentFile(
|
|
||||||
size: bytes.length,
|
|
||||||
path: pickedFile.path,
|
|
||||||
bytes: bytes,
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
late FileType type;
|
late FileType type;
|
||||||
if (fileType == DefaultAttachmentTypes.image) {
|
if (fileType == DefaultAttachmentTypes.image) {
|
||||||
|
|||||||
Reference in New Issue
Block a user