onboardingPath function
Does a check on user profile on whether logged in user has bio data and partnerType and redirects accordingly
Implementation
OnboardingPathConfig onboardingPath({required CoreState state}) {
final BioData? userBio = state.userState!.userProfile!.userBioData;
// check the validity bio names. This check is here in the event the name as set on 'UNKNOWN'
// which is not a valid name
if (userBio!.firstName == null ||
userBio.lastName == null ||
userBio.firstName!.getValue() == UNKNOWN ||
userBio.lastName!.getValue() == UNKNOWN) {
return OnboardingPathConfig(userNamesRoute);
}
return OnboardingPathConfig(homePageRoute);
}