firebase_user_stream 1.1.0 copy "firebase_user_stream: ^1.1.0" to clipboard
firebase_user_stream: ^1.1.0 copied to clipboard

This package aims to provide a functionality missing from firebase_auth, which is to be able to reload user data from the server and get Stream updates with the new data.

example/example.dart

import 'package:firebase_user_stream/firebase_user_stream.dart';

/// This example is just to show how can you use the library on your code. As
/// this library works very tightly with [FirebaseAuth] it's hard to make a
/// simple example, as we will need to add a sign-in or sign-out in the example
/// itself, which goes beyond the libraries' purposes.
void main() {
  FirebaseUserReloader.onUserReloaded.listen((user) {
    print('Reloaded: $user');
  });

  FirebaseUserReloader.onAuthStateChangedOrReloaded.listen((user) {
    print('Reloaded or auth state changed: $user');
  });

  FirebaseUserReloader.reloadCurrentUser();
  FirebaseUserReloader.reloadCurrentUser((user) => user.emailVerified);
}
20
likes
40
pub points
9%
popularity

Publisher

verified publisherfeinstein.com.br

This package aims to provide a functionality missing from firebase_auth, which is to be able to reload user data from the server and get Stream updates with the new data.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

firebase_auth, flutter, rxdart

More

Packages that depend on firebase_user_stream