Facebook
From Beefy Parrot, 2 Days ago, written in Plain Text.
This paste is a reply to main from Ivory Hamerkop - view diff
Embed
Download Paste or View Raw
Hits: 29
  1.  
  2. import 'package:firebase_auth/firebase_auth.dart';
  3. import 'package:logistify/database.dart';
  4. import 'package:logistify/tasks.dart';
  5.  
  6.  
  7. class TaskUser {
  8.   String name;
  9.   String lastname;
  10.   String userID;
  11.  
  12.   TaskUser({this.name  = "Max", this.lastname  = "Mustermann", required this.userID});
  13.  
  14. }
  15.  
  16. Future saveUser(String n, String l) async {
  17.   User fireUser;
  18.   FirebaseAuth auth = FirebaseAuth.instance;
  19.   UserCredential userCredential = await auth.signInAnonymously();
  20.   fireUser = userCredential.user!;
  21.  
  22.  
  23.   //return await setValues(TaskUser(name: n, lastname: l, tasks: , userID: fireUser.uid));
  24.   return null;
  25. }
  26.  
  27.