Skip to content

Instantly share code, notes, and snippets.

@ShivamGoyal1899
Created June 12, 2019 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShivamGoyal1899/5add915e48c6e41bba5a4b928ee8ca61 to your computer and use it in GitHub Desktop.
Save ShivamGoyal1899/5add915e48c6e41bba5a4b928ee8ca61 to your computer and use it in GitHub Desktop.
Future<void> _createTrip(BuildContext context) async {
// Display the loading indicator.
setState(() => _isLoading = true);
await ScopedModel.of<PhotosLibraryApiModel>(context)
.createAlbum(tripNameFormController.text)
.then((Album album) {
// Hide the loading indicator.
setState(() => _isLoading = false);
Navigator.pop(context);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment