Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. import 'package:cloud_firestore/cloud_firestore.dart';
  2. import 'dart:async';
  3. import 'package:firebase_auth/firebase_auth.dart';
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12. class MethodA {
  13.  
  14. // id(user, context){
  15. // var name =user.email;
  16.  
  17. // }
  18. String identity;
  19.  
  20.  
  21. MethodA({this.iD});
  22.  
  23. bool isLoggedIn() {
  24. if (FirebaseAuth.instance.currentUser() != null) {
  25. return true;
  26. } else {
  27. return false;
  28. }
  29. }
  30.  
  31.  
  32.  
  33. Future<void> addUserA( userinfo) async {
  34. //this.iD=id;
  35.  
  36. Firestore.instance
  37. .collection('user')
  38. .document('furtherinfo').collection(identity).document('Personal Info')
  39. .setData(userdoc)
  40. .catchError((e) {
  41. print(e);
  42. });
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement