Skip to content

Conversation

@vickz84259
Copy link
Collaborator

The PR includes the following changes:

  • Upgrade the minimum Dart version to 3.8.0 from 2.19.0
  • Upgrade the minimum Flutter version to 3.32.0 from 2.8.1
  • Formatting changes as part of Dart 3.7 and 3.8
  • Updated dependencies
  • Project wide refactors to use features added since Dart 3.0 to 3.8
  • Addition of onError property to Session, Chatbox and ConversationList.

Reviewing

Review the PR commit by commit. It'll be much easier that way.

As part of this, some refactors were made. Some of them
like switch expressions are only available from Dart 3.0.

Signed-off-by: Victor Omondi <victor@slick.co.ke>
Many packages from Dart and Flutter devs had already
raised their Dart and Flutter minimum versions over the years.
This means that our customers have had enough time to
update the same for their apps.

Although the patch update of `shared_preferences` (2.5.3 -
2.5.4) included an update to the Dart minimum (3.8.0 - 3.9.0),
setting our package to 3.8 as the minimum allows us to
downgrade `shared_preferences` should a customer
complain about the `3.9.0` requirement.

Dart 3.8.0 was made available on 2025/05/20 while 3.9.0 was
made available on 2025/08/13.

There wasn't much thought put into the Flutter version other
than the 3.32.0 being the first one to support Dart 3.8.0.

Signed-off-by: Victor Omondi <victor@slick.co.ke>
With dart 3.7 and 3.8, significant changes were made to the
formmating rules. Since we've updated the minimum Dart
version of our package to 3.8, these new changes are now
effective.

Signed-off-by: Victor Omondi <victor@slick.co.ke>
Signed-off-by: Victor Omondi <victor@slick.co.ke>
Signed-off-by: Victor Omondi <victor@slick.co.ke>
These are just stuff I missed in previous refactors.

Signed-off-by: Victor Omondi <victor@slick.co.ke>
Signed-off-by: Victor Omondi <victor@slick.co.ke>
Signed-off-by: Victor Omondi <victor@slick.co.ke>
Signed-off-by: Victor Omondi <victor@slick.co.ke>
@vickz84259 vickz84259 requested a review from bugnano January 27, 2026 11:54
Copy link
Collaborator

@bugnano bugnano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! 😀

I especially like the new null-aware elements, they make the code much more concise and readable.

I have a question:
What's the purpose of onError?
I mean, for what I understand, if there's an error message printed on the JS console, the onError callback is called.
Did a customer ask for this? What's your intended usage for that?

@vickz84259
Copy link
Collaborator Author

I have a question: What's the purpose of onError? I mean, for what I understand, if there's an error message printed on the JS console, the onError callback is called. Did a customer ask for this? What's your intended usage for that?

It's basically provides visibility into any TalkJS related errors that occur within the WebView. In React Native this was requested by a customer so that they could know of errors that prevent rendering of messages or conversations. Also, recently a customer shared a video of issues their customer faced. We were able to attribute this to network issues on the user's end. So having this extra information regarding errors will be useful for such scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants