i have form with three dropdown buttons and these were declared at top of the class,
String _currentItemSelected1 = 'low';
String _currentItemSelected2 = 'low';
String _currentItemSelected3 = 'low';
then I have RisedButton with onPressed property with this body:
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SuggestionResult(
_currentItemSelected1,
_currentItemSelected2,
_currentItemSelected3,
),
),
);
in SuggestionResult class I was override the constructor as following:
final String temp;
final String hum;
final String light;
SuggestionResult({this.temp, this.hum, this.light});
Now, the PROBLEM is when I calling SuggestionResult class it says: "Too many positional arguments: 0 expected, but 3 found. Try removing the extra positional arguments, or specifying the name for named arguments."