CopyPastor

Detecting plagiarism made easy.

Score: 1.7311177307047378; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2022-08-21
by Mansoor Malik

Original Post

Original - Posted on 2022-03-03
by Tasnuva Tavasum oshin



            
Present in both answers; Present only in the new answer; Present only in the old answer;

You can use [Future.delayed][1] to run your code after some time. e.g.:
Future.delayed(const Duration(milliseconds: 500), () { // Here you can write your code setState(() { // Here you can write your code for open new view }); });
In `setState` function, you can write a code which is related to app UI e.g. refresh screen data, change label text, etc.

[1]: https://api.flutter.dev/flutter/dart-async/Future/Future.delayed.html
You need to add Some delay , In this Delay you can show a loading icon . for delay you can use :

Future.delayed(const Duration(milliseconds: 500), () { // Here you can write your code setState(() { // Here you can write your code for open new view }); });
This will solve your problem

        
Present in both answers; Present only in the new answer; Present only in the old answer;