Created
December 5, 2019 15:54
-
-
Save fabiojansenbr/d7142bb881830368f1029424fdb0b8e5 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
_loadFromApi() async { | |
setState(() { | |
isLoading = true; | |
}); | |
var apiProvider = EmployeeApiProvider(); | |
await apiProvider.getAllEmployees(); | |
// wait for 2 seconds to simulate loading of data | |
await Future.delayed(const Duration(seconds: 2)); | |
setState(() { | |
isLoading = false; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment