Skip to content

Instantly share code, notes, and snippets.

@yaizudamashii
Created August 11, 2021 16:52
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 yaizudamashii/83e6adb747865d93a6d4ea2188f9df7a to your computer and use it in GitHub Desktop.
Save yaizudamashii/83e6adb747865d93a6d4ea2188f9df7a to your computer and use it in GitHub Desktop.
currentUserStream.when(
data: (User user) {
return ProfileButton(
userImagePath: user.imageUrl,
onPressed: () {
Navigator.of(context).pushNamed(
AppRoutes.profile,
arguments: { 'uid': user.identifier },
);
},
);
},
loading: () {
return Container();
},
error: (error, stackTrace) {
return Container();
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment