Last active
January 18, 2020 20:38
-
-
Save Classy-Bear/f81a005588403706ad50d686ce9b8919 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@override | |
void initState() { | |
super.initState(); | |
random = Random(); | |
refreshList(); | |
} | |
Future<Null> refreshList() async { | |
refreshKey.currentState?.show(); | |
await Future.delayed(Duration(seconds: 2)); | |
setState(() { | |
list = List.generate(random.nextInt(10), (i) => "Item $i"); | |
}); | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment