deleteAccount method
Implementation
Future<void> deleteAccount() async {
if (_userId is String) {
final userId = _userId;
state = AsyncValue.loading();
try {
await _userService.deleteAccount(userId);
} catch (err) {
/// Restore data
state = AsyncValue.data(await _fetchUserData());
throw err;
}
}
}