Now that we have our bank account back on screen, we will add an input field with the #number
id (and of the number
type) that captures the amount of money we want to deposit or withdraw from our account. We add a Deposit-Withdrawal button to initiate this action, and also an Add interest button to calculate and add interest to our account. Our screen now looks like the following screenshot:
Here is the code of bank_terminal_s5.dart
(declarations are left out for brevity):
void main() { bind_elements(); (1) attach_event_handlers(); (2) disable_transactions(true); (3) } bind_elements() { owner = querySelector('#owner''); balance = querySelector ('#balance''); number = querySelector ('#number''); btn_other = querySelector ('#btn_other''); amount...