Added method to the home bloc to retrieve the photo url of the user

This commit is contained in:
Mariano Uvalle 2019-03-20 18:59:30 -06:00
parent d97b542238
commit 8e378c0e8e

View file

@ -28,6 +28,11 @@ class HomeBloc {
_firestore.getUserTasks(user.email).pipe(_tasks); _firestore.getUserTasks(user.email).pipe(_tasks);
} }
Future<String> getUserAvatarUrl() async {
final user = await _auth.currentUser;
return user.photoUrl;
}
void markTaskAsDone(TaskModel task) async { void markTaskAsDone(TaskModel task) async {
_firestore.updateTask( _firestore.updateTask(
task.id, task.id,