In this spiral, we will read all our Bank Account data from the local storage and display the numbers in a dropdown list. Upon selection, all the details of the bank account will be shown in a table. This is how our page will look like, at the start, upon opening the selection list:
In this spiral, we will let the code construct the web page:
void main() {
readLocalStorage(); (1)
constructPage(); (2)
sel.onChange.listen(showAccount); (3)
}
In line (1)
, the account numbers are read from the local storage, extracted, and put into a list:
readLocalStorage() { account_nos = []; for (var key in window.localStorage.keys) { account_nos.add(key.substring(12)); // extract account number } }
The method in line (2)
calls two...