firebase_user_stream 0.1.0+1 copy "firebase_user_stream: ^0.1.0+1" to clipboard
firebase_user_stream: ^0.1.0+1 copied to clipboard

outdated

Package for subscribing to FirebaseUser reload updates. This package aims to provide a functionality missing from the firebase_auth package, which is to be able to reload user data from the server and [...]

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.isEmailVerified);
}
20
likes
0
pub points
31%
popularity

Publisher

verified publisherfeinstein.com.br

Package for subscribing to FirebaseUser reload updates. This package aims to provide a functionality missing from the firebase_auth package, 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

unknown (LICENSE)

Dependencies

firebase_auth, flutter, rxdart

More

Packages that depend on firebase_user_stream