Skip to content

Instantly share code, notes, and snippets.

@antklim
Last active November 9, 2020 21:42
Show Gist options
  • Save antklim/73ce640ac037e648d592d02f011d4362 to your computer and use it in GitHub Desktop.
Save antklim/73ce640ac037e648d592d02f011d4362 to your computer and use it in GitHub Desktop.
class _CalculusScreenState extends State<CalculusScreen> {
...
void onCalulatorResultChanged(num value) {
setState(() {
calculatorValue = value;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
...
// memory and upate callback added
CalculatorInput(memory: memory, onChanged: onCalulatorResultChanged),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment