deleteAccount method
Implementation
@override
Future<void> deleteAccount() async {
try {
final user = _auth.currentUser;
if (user == null) {
throw UserNotFoundException();
}
await user.delete();
} on firebase_auth.FirebaseAuthException catch (e) {
switch (e.code) {
case 'requires-recent-login':
throw RecentLoginRequiredException();
default:
throw UnknownAuthException(e.message ?? e.toString());
}
} catch (e) {
throw UnknownAuthException(e.toString());
}
}