How to know the time period server response in the Dio library?
I use postman, it returns status, time period, size of the response, ...
How to get values in Dio lib? (I need it to write log)
How to know the time period server response in the Dio library?
I use postman, it returns status, time period, size of the response, ...
How to get values in Dio lib? (I need it to write log)
You could use a stop watch to measure how much the request took
var stopWatch = Stopwatch();
stopWatch.start();
performReques();
stopWatch.stop();
// convert the duration to string
var elapsedString = stopWatch.elapsed.toString();
// or just get duration in seconds
var elapsedSeconds = stopWatch.elapsed.inSeconds;