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
void _showUrlDialog(BuildContext context) { | |
print('This is the shareableUrl:\n${album.shareInfo.shareableUrl}'); | |
_showShareDialog( | |
context, | |
'Share this URL with anyone.' | |
'Anyone with this URL can access all items.', | |
album.shareInfo.shareableUrl); | |
} |
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
void _showShareToken(BuildContext context) { | |
if (album.shareInfo == null) { | |
print("Not shared, sharing album first."); | |
// Album is not shared yet, share it first, then display dialog | |
_shareAlbum(context).then((_) { | |
_showTokenDialog(context); | |
}); | |
} else { | |
// Album is already shared, display dialog with token | |
_showTokenDialog(context); |
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
void _showTokenDialog(BuildContext context) { | |
print('This is the shareToken:\n${album.shareInfo.shareToken}'); | |
_showShareDialog( | |
context, 'Use this token to share', album.shareInfo.shareToken); | |
} |
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
void updateAlbums() async { | |
// Reset the flag before loading new albums | |
hasAlbums = false; | |
// Clear all albums | |
_albums.clear(); | |
// Add albums from the user's Google Photos account | |
// var ownedAlbums = await _loadAlbums(); | |
// if (ownedAlbums != null) { | |
// _albums.addAll(ownedAlbums); | |
// } |
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
Future<void> _joinTrip(BuildContext context) async { | |
// Show loading indicator | |
setState(() => _isLoading = true); | |
// Call the API to join an album with the entered share token | |
await ScopedModel.of<PhotosLibraryApiModel>(context) | |
.joinSharedAlbum(shareTokenFormController.text); | |
// Hide loading indicator | |
setState(() => _isLoading = false); |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<string name="app_name">Enappd</string> | |
<string name="facebook_app_id">YOUR_APP_ID</string> | |
<string name="fb_login_protocol_scheme">YOUR_PORTAL_SCHEME</string> | |
</resources> |
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
<meta-data android:name="com.facebook.sdk.ApplicationId" | |
android:value="@string/facebook_app_id"/> | |
<activity android:name="com.facebook.FacebookActivity" | |
android:configChanges= | |
"keyboard|keyboardHidden|screenLayout|screenSize|orientation" | |
android:label="@string/app_name" /> | |
<activity | |
android:name="com.facebook.CustomTabActivity" | |
android:exported="true"> |
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
<uses-permission android:name="android.permission.INTERNET"/> |
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
dependencies: | |
flutter: | |
sdk: flutter | |
# Add following line to code | |
flutter_facebook_login: ^1.1.1 | |
http: |
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
<key>CFBundleURLTypes</key> | |
<array> | |
<dict> | |
<key>CFBundleURLSchemes</key> | |
<array> | |
<string>fb10645493####9351</string> | |
</array> | |
</dict> | |
</array> | |
<key>FacebookAppID</key> |