signUp method
Implementation
@override
Future<ThirdPartySessionModel> signUp(
String mail, String pass, String name) async {
try {
var data = await this.api.signUp(mail, pass);
// DATA
if (data != null) {
String? token = await data.getIdToken(true);
if (!data.emailVerified) {
await this.api.sendEmail();
}
return ThirdPartySessionModel(
token: token!,
display: data.displayName,
mail: data.email,
pic: data.photoURL,
mailValidationDone: data.emailVerified,
);
// NO DATA
} else {
throw Exception();
}
} on PlatformException catch (pe) {
ModLogger.e(tag: TAG, msg: "${pe.toString()}", error: pe);
throw pe;
} on Exception catch (e) {
ModLogger.e(tag: TAG, msg: "${e.toString()}", error: e);
throw ModDataException();
}
}