Skip to content

Instantly share code, notes, and snippets.

@adityadroid
Created October 6, 2019 18:27
Show Gist options
  • Select an option

  • Save adityadroid/4f0393f91ec74bbf2e466f724274ed58 to your computer and use it in GitHub Desktop.

Select an option

Save adityadroid/4f0393f91ec74bbf2e466f724274ed58 to your computer and use it in GitHub Desktop.
@override
Future<void> updateProfilePicture(String profilePictureUrl) async {
String uid = SharedObjects.prefs.getString(Constants.sessionUid);
DocumentReference ref = fireStoreDb.collection(Paths.usersPath).document(
uid); //reference of the user's document node in database/users. This node is created using uid
var data = {
'photoUrl': profilePictureUrl,
};
await ref.setData(data, merge: true); // set the photourl
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment