CAKE-198 | applied ability to make a note with some details about transaction; added transactionNote property and note getter to transaction_description.dart; added multiline textfield for notes (send_page.dart); added transaction_details_list_item.dart, textfield_list_item.dart, textfield_list_row.dart, transaction_details_view_model.dart to the app

This commit is contained in:
OleksandrSobol
2020-12-22 20:42:30 +02:00
parent 782de5d1d8
commit 023336d460
11 changed files with 312 additions and 95 deletions
+7 -1
View File
@@ -37,6 +37,7 @@ abstract class SendViewModelBase with Store {
this._fiatConversationStore, this.transactionDescriptionBox)
: state = InitialExecutionState(),
_cryptoNumberFormat = NumberFormat(),
note = '',
sendAll = false {
_setCryptoNumMaximumFractionDigits();
}
@@ -53,6 +54,9 @@ abstract class SendViewModelBase with Store {
@observable
String address;
@observable
String note;
@observable
bool sendAll;
@@ -105,6 +109,7 @@ abstract class SendViewModelBase with Store {
cryptoAmount = '';
fiatAmount = '';
address = '';
note = '';
}
@action
@@ -127,7 +132,8 @@ abstract class SendViewModelBase with Store {
if (_settingsStore.shouldSaveRecipientAddress &&
(pendingTransaction.id?.isNotEmpty ?? false)) {
await transactionDescriptionBox.add(TransactionDescription(
id: pendingTransaction.id, recipientAddress: address));
id: pendingTransaction.id, recipientAddress: address,
transactionNote: note));
}
state = TransactionCommitted();