Created
September 4, 2019 10:27
-
-
Save shark-h/4ed4e3390db11b15ee5c9e772e698fb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final HttpsCallable callable = | |
CloudFunctions.instance.getHttpsCallable( | |
functionName: 'registerUser', | |
); | |
try { | |
await callable.call(<String, dynamic>{ | |
'email': email.text, | |
'displayName': name.text, | |
'password': password.text | |
}); | |
await FirebaseAuth.instance | |
.signInWithEmailAndPassword( | |
email: email.text, password: password.text); | |
Navigator.pushReplacement( | |
context, | |
MaterialPageRoute( | |
builder: (context) => AuthCheck()), | |
); | |
} catch (e) { | |
setState(() { | |
loading = false; | |
}); | |
print(e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment