-
Notifications
You must be signed in to change notification settings - Fork 14
feat!: v2.0.0 (BREAKING) upgrade dependencies, improved null-safety #2
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: master
Are you sure you want to change the base?
Conversation
# Conflicts: # pubspec.yaml
|
|
||
| Provisioning({required this.transport, required this.security}); | ||
|
|
||
| Future<bool> establishSession() async { |
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.
so from jsut checking for a bool you'll rather change to a try/catch?
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.
Yes.
I believe the old way is faulty API design, since it obfuscates the error that occurred and instead simply returns false. That doesn't allow consumers (client apps) to make good decisions on how to handle the error depending on what kind of error was thrown.
If consumers still want to treat this as false, they can simply do so using a try/catch themselves.
|
This would be very useful. I am trying to integrate this module with flutterflow and it's failing badly. Even the example does not build on Android Studio. Just to note that the example app does not run. Keeps throwing this error: |
Description
This PR updates various aspects of the package to improve code safety, styling and idiomaticity. In particular, these changes have been implemented:
2.0.0Future<bool>now return aFuture<void>. In cases where these functions returnedfalse, they now throw an exception.nullnow throw those exceptions.logger.dartfor consumer-customizable logging (importpackage:esp_provisioning_softap/logger.dartand setloggeras desired).very_good_analysispackage and linter rules and fix all issues.What should be done after this PR merged?
A new version has to be pushed to https://pub.dev.
Remaining work
I recommend to add a subsequent PR with additional cleanup:
If you have any questions, feel free to reach out. Hope this helps.
Thanks for all your work!