File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
packages/stream_chat_flutter/lib/src/message_input Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1019,7 +1019,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
10191019 PollCreated () => _onPollCreated (result.poll),
10201020 // Handle/Notify returned errors.
10211021 AttachmentPickerError () => _onAttachmentPickerError (result),
1022- _ => () {} , // Ignore other results.
1022+ _ => Future . value () , // Ignore other results.
10231023 };
10241024 }
10251025
Original file line number Diff line number Diff line change @@ -176,11 +176,12 @@ class _ChannelPageState extends State<ChannelPage> {
176176 Channel channel,
177177 StreamAttachmentPickerResult result,
178178 ) {
179- // Notify that the result was not handled.
180- if (result is ! LocationPicked ) return false ;
179+ if (result is LocationPicked ) {
180+ _onShareLocationPicked (channel, result.location).ignore ();
181+ return true ; // Notify that the result was handled.
182+ }
181183
182- _onShareLocationPicked (channel, result.location).ignore ();
183- return true ; // Notify that the result was handled.
184+ return false ; // Notify that the result was not handled.
184185 }
185186
186187 Future <SendMessageResponse > _onShareLocationPicked (
You can’t perform that action at this time.
0 commit comments