Skip to content

Commit 2d2603b

Browse files
Copilotkevmo314
andauthored
Fix Crashlytics crash: "Null check operator used on a null value" in MessageInputWidget (#1362)
Co-authored-by: kevmo314 <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: Kevin Wang <[email protected]>
1 parent 3c541f7 commit 2d2603b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/components/message_input.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ class _MessageInputWidgetState extends State<MessageInputWidget> {
185185

186186
// Handles any shared data we may receive.
187187
void _handleSharedData(String sharedData) {
188+
if (!mounted || sharedData.isEmpty) {
189+
return;
190+
}
188191
setState(() {
189192
_textEditingController?.text = sharedData;
190193
});

0 commit comments

Comments
 (0)