flutter pass onPress function as parameter
int result = 0;
void calculate(num1, num2) {
setState(() {
result = num1 + num2;
});
}
new RaisedButton(
onPressed: () => calculate(1, 100),
...
),
new Text("$result")