skip to Main Content

How to call newuser() function in button onlick? (Firebase)

<!DOCTYPE html> <html lang="ko"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <title>DB Test</title> </head> <body> <a><h1>DB Test</h1></a> <div class="input-box"> <input id="email" type="text" name="username" placeholder="email"> <label for="email">Email</label> </div> <div class="input-box"> <input id="password" type="password" name="password" placeholder="pw"> <label for="password">password</label> </div>…

VIEW QUESTION

Get DocumentSnapshot by its id from Firebase collection

I'm trying to get DocumentSnapshot from collection this my code Stream<QuerySnapshot> streamState() => collectionRef.snapshots(); return StreamBuilder<QuerySnapshot>( stream: auth.streamState(), builder: (BuildContext context, AsyncSnapshot<QuerySnapshot> snapshot){ if (snapshot.hasData){ DocumentSnapshot doc = snapshot.data!.docs.elementAt(0); print(doc.id); } return Container( color: Colors.white, ); } ); it work…

VIEW QUESTION
Back To Top
Search