-
Notifications
You must be signed in to change notification settings - Fork 174
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
Add default values for hive fields for Node, UnspentCoinsInfo, Wallet… #598
Conversation
…Info, Order, Contact, TransactionDescription, Trade
@HiveField(2) | ||
WalletType type; |
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.
is this guaranteed it won't be null?
@HiveField(4, defaultValue: '') | ||
late String stateRaw; |
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.
with the current implementation of the constructor, this variable may not be initialized if the state is null, resulting in a late variable not initialized
exception
@HiveField(9, defaultValue: 0) | ||
late int providerRaw; |
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.
with the current implementation of the constructor, this variable may not be initialized if the provider is null, resulting in a late variable not initialized
exception
@HiveField(2, defaultValue: 0) | ||
late int raw; |
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.
with the current implementation of the constructor, this variable may not be initialized if the type is null, resulting in a late variable not initialized
exception
@HiveField(1, defaultValue: 0) | ||
late int providerRaw; |
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.
same
@HiveField(2, defaultValue: 0) | ||
late int fromRaw; | ||
|
||
CryptoCurrency get from => CryptoCurrency.deserialize(raw: fromRaw); | ||
|
||
@HiveField(3) | ||
@HiveField(3, defaultValue: 0) | ||
late int toRaw; | ||
|
||
CryptoCurrency get to => CryptoCurrency.deserialize(raw: toRaw); | ||
|
||
@HiveField(4) | ||
@HiveField(4, defaultValue: '') | ||
late String stateRaw; |
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.
same
…Info, Order, Contact, TransactionDescription, Trade