future delayed timeout flutter code example
Example: future delayed flutter
Future.delayed(Duration(seconds: 5), () {
// 5s over, navigate to a new page
Navigator.pushNamed(context, MaterialPageRoute(builder: (_) => Screen2()));
});
Future.delayed(Duration(seconds: 5), () {
// 5s over, navigate to a new page
Navigator.pushNamed(context, MaterialPageRoute(builder: (_) => Screen2()));
});