in the code below that is for throwing dice, I want to wait 2 seconds after each dice throwing. I tested sleep(duration) and await Future.delayed(duration); the first one makes a delay before updating the screen which means when I tap the TextButton, it waits for 2 seconds and then changes the screen, but I want it to be changed and then waits for 2 seconds. The second one actually does nothing and there is no delays. Here is the code:
Duration delay = const Duration(seconds: 2);
