Flutter, Dart setState not reloading state Flutter, Dart setState not reloading state dart dart

Flutter, Dart setState not reloading state


Your setState((){}) only rebuilds the build method of InputRow class.You need to rebuild the build method of MyHomePage to update all those fields.User Provider.Create a separate class to contains the value of those fields and notifyListeners() to update UI.

class Results extends ChangeNotifier{//your logicsvoid calculate() {  //your calculationsnotifyListeners();}}