acceptCredentialTerms function
- BuildContext context
Record that the given user has accepted the credential terms.
The user will be added to the list of accepted credential terms users.
Implementation
Future<bool> acceptCredentialTerms(BuildContext context) {
final container = ProviderScope.containerOf(context);
final user = container.read(currentUserProvider).valueOrNull?.id;
assert(user != null);
return addStringToPrefList(
context,
provider: acceptedCredentialTermsUsersProvider,
value: user!,
);
}