fayeed/dash_chat

[Question] Does this have null safety?

Opened this issue · 5 comments

I know it is no longer in development, but I recently migrated my app to null safety and parsed_text which this library depends on was causing problems, My chat implementation was working properly before migrating, I want to know if there is official implementation of null safety for this library because I can't see it in pub.dev and the one I downloaded dash_chat: ^1.1.15-nullsafety has problems.

You should try 1.1.16

Also if you are interested there is a v2 branch with new changes if you are willing to try it.

Hey, I wasn't willing to try new v2 just yet because I was not doing any new development, just upgrading the app to null safety, that's all.

This is the error I am getting whenever messages list is not empty:

`======== Exception caught by widgets library =======================================================
The following StateError was thrown building ParsedText(dirty):

Bad state: No element

The relevant error-causing widget was:
DashChat file:///Users/regissaffi/FlutterProjects/gray/lib/views/pages/chat.dart:88:16
When the exception was thrown, this was the stack:
#0 Iterable.firstWhere (dart:core/iterable.dart:516:5)
#1 ParsedText.build. (package:flutter_parsed_text/src/parsed_text.dart:129:34)
#2 _StringBase.splitMapJoin (dart:core-patch/string_patch.dart:824:27)
#3 ParsedText.build (package:flutter_parsed_text/src/parsed_text.dart:118:15)
#4 StatelessElement.build (package:flutter/src/widgets/framework.dart:4569:28)
...
====================================================================================================`

Any help to resolve this, and also, how can I try v2 in case this can't be solved just yet?

Thanks!

Hey, I just tested this on v1.1.16 and can't reproduce this.

Hey, I wasn't willing to try new v2 just yet because I was not doing any new development, just upgrading the app to null safety, that's all.

This is the error I am getting whenever messages list is not empty:

`======== Exception caught by widgets library =======================================================
The following StateError was thrown building ParsedText(dirty):

Bad state: No element

The relevant error-causing widget was:
DashChat file:///Users/regissaffi/FlutterProjects/gray/lib/views/pages/chat.dart:88:16
When the exception was thrown, this was the stack:
#0 Iterable.firstWhere (dart:core/iterable.dart:516:5)
#1 ParsedText.build. (package:flutter_parsed_text/src/parsed_text.dart:129:34)
#2 _StringBase.splitMapJoin (dart:core-patch/string_patch.dart:824:27)
#3 ParsedText.build (package:flutter_parsed_text/src/parsed_text.dart:118:15)
#4 StatelessElement.build (package:flutter/src/widgets/framework.dart:4569:28)
...
====================================================================================================`

Any help to resolve this, and also, how can I try v2 in case this can't be solved just yet?

Thanks!

I also encountered this problem after upgrading to 1.1.16. Plan to downgrade to 1.1.15 again after the issue has been resolved.