diff --git a/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 00000000..18d98100
--- /dev/null
+++ b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/lib/src/message_input.dart b/lib/src/message_input.dart
index e1b3cfc1..0b435b24 100644
--- a/lib/src/message_input.dart
+++ b/lib/src/message_input.dart
@@ -56,13 +56,13 @@ import 'stream_channel.dart';
/// The widget renders the ui based on the first ancestor of type [StreamChatTheme].
/// Modify it to change the widget appearance.
class MessageInput extends StatefulWidget {
- MessageInput(
- {Key key,
- this.onMessageSent,
- this.parentMessage,
- this.editMessage,
- this.maxHeight = 150})
- : super(key: key);
+ MessageInput({
+ Key key,
+ this.onMessageSent,
+ this.parentMessage,
+ this.editMessage,
+ this.maxHeight = 150,
+ }) : super(key: key);
/// Message to edit
final Message editMessage;
@@ -506,6 +506,10 @@ class _MessageInputState extends State {
}
void _showAttachmentModal() {
+ if (_focusNode.hasFocus) {
+ _focusNode.unfocus();
+ }
+
showModalBottomSheet(
clipBehavior: Clip.hardEdge,
shape: RoundedRectangleBorder(
@@ -548,7 +552,6 @@ class _MessageInputState extends State {
leading: Icon(Icons.camera_alt),
title: Text('Photo from camera'),
onTap: () {
- ImagePicker.pickImage(source: ImageSource.camera);
_pickFile(FileType.image, true);
Navigator.pop(context);
},
@@ -587,6 +590,10 @@ class _MessageInputState extends State {
file = await FilePicker.getFile(type: type);
}
+ if (file == null) {
+ return;
+ }
+
final channel = StreamChannel.of(context).channel;
final bytes = await file.readAsBytes();
diff --git a/pubspec.yaml b/pubspec.yaml
index 0473d4f3..f1e2618e 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -10,8 +10,6 @@ dependencies:
flutter:
sdk: flutter
rxdart: ^0.23.1
-
-
jiffy: ^3.0.1
cached_network_image: ^2.0.0
flutter_markdown: ^0.3.4