Last active
December 20, 2020 09:09
-
-
Save asavchuk/438c849955e12970e60ef05cd22d5317 to your computer and use it in GitHub Desktop.
ep_19
This file contains hidden or 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
import 'dart:async'; | |
import 'package:firebase_auth/firebase_auth.dart'; | |
class AuthService { | |
FirebaseAuth _firebaseAuth = FirebaseAuth.instance; | |
final _controller = StreamController<String>(); | |
Stream<String> get onAuthStateChanged { | |
User user = _firebaseAuth.currentUser; | |
_controller.add(user?.uid); | |
return _controller.stream; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment