Skip to content

Commit

Permalink
Fix call to async functions
Browse files Browse the repository at this point in the history
  • Loading branch information
devnet0x committed Sep 27, 2024
1 parent 890965e commit 3a7e314
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions examples/starknet_counter/lib/ui/counter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,21 @@ class _CounterPageState extends State<CounterPage> {
TextEditingController amount = TextEditingController();
_increaseCount() async {
await increaseCounter();
setState(() {
_getCounter();
});
await _getCounter();
setState(() {});
}

_increaseCountBy() async {
await increaseCounterBy(amount.text.trim());
setState(() {
_getCounter();
amount.clear();
});
await _getCounter();
amount.clear();
setState(() {});
}

_decreaseCount() async {
await decreaseCounter();
setState(() {
_getCounter();
});
await _getCounter();
setState(() {});
}

_getCounter() async {
Expand Down

0 comments on commit 3a7e314

Please sign in to comment.