Skip to content
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

Fix/keep model keys on release #146

Merged
merged 3 commits into from
Nov 27, 2021
Merged

Conversation

brim-borium
Copy link
Owner

No description provided.

@@ -12,7 +12,7 @@ class ConnectionStatus {
});

@JsonKey(name: 'connected')
final bool connected;
final bool? connected;
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about we just initialize it with false? Nullability seems a bit overkill here.

Copy link
Owner Author

Choose a reason for hiding this comment

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

will do

Copy link
Owner Author

Choose a reason for hiding this comment

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

made it not nullable and therefore defaulting to false

@@ -47,7 +57,7 @@ class _HomeState extends State<Home> {
_connected = false;
var data = snapshot.data;
if (data != null) {
_connected = data.connected;
_connected = data.connected ?? false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

See my other comment.

@brim-borium brim-borium force-pushed the fix/keep_model_keys_on_release branch from 623239d to feb52a5 Compare November 27, 2021 17:17
@fotiDim fotiDim merged commit 3f855dd into main Nov 27, 2021
@brim-borium brim-borium deleted the fix/keep_model_keys_on_release branch January 31, 2022 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Specific for android bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

subscribeConnectionStatus on Android release build crashes due to null safety
2 participants