how to set an wait time in flutter code example
Example 1: flutter wait for specific time
await Future.delayed(const Duration(seconds: 2), (){});
Example 2: flutter delay a function
Future.delayed(const Duration(milliseconds: 500), () {
// Here you can write your code
setState(() {
// Here you can write your code for open new view
});
});