Skip to content

Instantly share code, notes, and snippets.

@ShivamGoyal1899
Created June 12, 2019 11:21
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/73b8ddb5441e96eb412514a9567a647f to your computer and use it in GitHub Desktop.
Save ShivamGoyal1899/73b8ddb5441e96eb412514a9567a647f to your computer and use it in GitHub Desktop.
void _showShareableUrl(BuildContext context) {
if (album.shareInfo == null || album.shareInfo.shareableUrl == null) {
print('Not shared, sharing album first.');
// Album is not shared yet, share it first, then display dialog
_shareAlbum(context).then((_) {
_showUrlDialog(context);
});
} else {
// Album is already shared, display dialog with URL
_showUrlDialog(context);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment