From 8e378c0e8e1ccd9558abb148840234ea23b3feef Mon Sep 17 00:00:00 2001 From: AYM1607 Date: Wed, 20 Mar 2019 18:59:30 -0600 Subject: [PATCH] Added method to the home bloc to retrieve the photo url of the user --- lib/src/blocs/home_bloc.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/src/blocs/home_bloc.dart b/lib/src/blocs/home_bloc.dart index b2224d1..3925990 100644 --- a/lib/src/blocs/home_bloc.dart +++ b/lib/src/blocs/home_bloc.dart @@ -28,6 +28,11 @@ class HomeBloc { _firestore.getUserTasks(user.email).pipe(_tasks); } + Future getUserAvatarUrl() async { + final user = await _auth.currentUser; + return user.photoUrl; + } + void markTaskAsDone(TaskModel task) async { _firestore.updateTask( task.id,