-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add user changes stream #21
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #21 +/- ##
=======================================
Coverage 54.40% 54.40%
=======================================
Files 10 10
Lines 261 261
=======================================
Hits 142 142
Misses 119 119
☔ View full report in Codecov by Sentry. |
@@ -29,6 +29,9 @@ class Authenticator { | |||
/// 現在サインイン中のユーザー。サインインしていない場合はnullを返す。 | |||
User? get user => _auth.currentUser; | |||
|
|||
/// Listens for changes to the currently signed-in user. | |||
Stream<User?> get userChanges => _auth.userChanges(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just like Configurator
's onConfigUpdated
, that approach is less likely to lead to unexpected behavior...!
When exposing a Stream
, it's basically better to use late final
. Thank you 🙏
@@ -14,6 +14,7 @@ void main() { | |||
class MockAuth extends Fake implements FirebaseAuth {} | |||
|
|||
// TODO(riscait): add more tests | |||
// https://github.com/altive/flutterfire_adapter/issues/20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3bcb7cf
to
c5be867
Compare
I'll merge this for now! If there seems to be a problem, I'll fix it in a separate PR 🙏 |
🙌 What I did
✍️ What I didn't do
✅ Verification
Screenshots
Additional Information
I made it public because I wanted to use
userChanges
!