-
Notifications
You must be signed in to change notification settings - Fork 14
(Feat): Add onError handlers. #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
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>
https://dart.dev/language/collections#null-aware-element 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>
bugnano
left a comment
There was a problem hiding this 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?
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. |
The PR includes the following changes:
onErrorproperty to Session, Chatbox and ConversationList.Reviewing
Review the PR commit by commit. It'll be much easier that way.