Last active
December 20, 2019 22:34
-
-
Save Classy-Bear/29c2302ee0dc862000c9dd512617c7d2 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
import 'dart:math'; | |
final random = Random(); | |
final refreshKey = GlobalKey<RefreshIndicatorState>(); | |
var lista = []; | |
Future<Null> refreshList() async { | |
refreshKey.currentState?.show(atTop: false); | |
await Future.delayed(Duration(seconds: 1)); | |
setState(() { | |
lista = 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