I currently have an app which Sign's-In a User when a button is tapped by calling :
Future<void> anonymousSignIn(DocumentSnapshot<Object> document, context) async {
await FirebaseAuth.instance.signInAnonymously();
var user = await FirebaseAuth.instance.currentUser;
var uid = user.uid;
ScaffoldMessenger.of(context).showSnackBar(getSnackBar("Signed In"));
}
But I'd like the User to not have to press any button & instead be automatically Signed-In Anonymously when the App is Open - I'm not sure where to write that & how in my App
Also I ultimately will want to allow the user to also Sign-In with e-mail or Google so before Sign-In Anonymously upon Opening it will have to check if the user was not already Signed-In with those methods