[phpBB Debug] PHP Warning: in file [ROOT]/ext/lmdi/autolinks/event/listener.php on line 237: Undefined array key 26
[phpBB Debug] PHP Warning: in file [ROOT]/ext/lmdi/autolinks/event/listener.php on line 237: Trying to access array offset on value of type null
Answer Happy • I need help finishing this flutter code, please, please! I can provide more code details if needed I need the stock name
Page 1 of 1

I need help finishing this flutter code, please, please! I can provide more code details if needed I need the stock name

Posted: Thu Jun 02, 2022 7:46 am
by answerhappygod
I need help finishing this flutter code, please, please! I can
provide more code details if needed
I Need Help Finishing This Flutter Code Please Please I Can Provide More Code Details If Needed I Need The Stock Name 1
I Need Help Finishing This Flutter Code Please Please I Can Provide More Code Details If Needed I Need The Stock Name 1 (80.24 KiB) Viewed 17 times
I need the stock name and price to display the value from API
after the user input the name of the code in the show dialog
box.
I did already fetch the API using Future getQuote
please let me know
thank you
contentPadding: Edgeinsets.all 5.0, content: TextField( decoration: Input Decoration (hintText: "Symbol"), onChanged: (String value) { _stockSymbol = value; }, ), // TextField actions: <Widget>[ TextButton( child: const Text ("Add Stock"), onPressed: () async { if (_stockSymbol.isNotEmpty) { print('User entered Symbol: $_stockSymbol'); try { //TODO: //Inside of this try, //get the stock data with stockService.getQuote //but remember you must use await, //then if it is not null, //dig out the symbol, companyName, and latestPrice, //then create a new object of //type Stock and add it to //the database by calling //_databaseService.insertStock, //then get all the stocks from //the database with //_databaseService.getAllStocksFromDb and //attach them to _stockList, //then print all stocks to the console and, //finally call setstate at the end. await _stockService.getQuote( _stockSymbol, ); if (_stockSymbol != null) { B You, now. Uncommitted changes await _databaseService.insertStock(Stock( symbol: _stockSymbol.toUpperCase(), name: price: 5)); // Stock = _stockList await _databaseService.getAllStocks FromDb(); _databaseService.printAllStocks InDbToConsole(); setState(() {}); print('${_inputStock} helloooo'); } catch (e) { print('HomeView_inputStock catch: $e'); }