How to open dialog only when request is taking too long time? #2197
-
I want to implement simple dialog which should only show when request is taking more than 200ms. |
Beta Was this translation helpful? Give feedback.
Answered by
SoroushBeigi
Apr 22, 2024
Replies: 1 comment
-
You can use a bool to know if the request is taking too long. it can be implemented like this:
You can also use Dio's built-it CONNECT_TIMEOUT exception and set the timeout in BaseOptions |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sollyow
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use a bool to know if the request is taking too long. it can be implemented like this:
You can also use Dio's built-it CONNECT_TIMEOUT exception and set the timeout in BaseOptions