Answers for "using future to delay an action in fluttertt"

6

future delayed flutter

Future.delayed(Duration(seconds: 5), () {
  // 5s over, navigate to a new page
  Navigator.pushNamed(context, MaterialPageRoute(builder: (_) => Screen2()));
});
Posted by: Guest on March-17-2021
4

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
  });

});
Posted by: Guest on June-17-2020

Code answers related to "using future to delay an action in fluttertt"

Code answers related to "Dart"

Browse Popular Code Answers by Language