acceptTerms method
- String version
Records that the user accepted the given terms version right now.
Implementation
Future<void> acceptTerms(String version) async {
final userId = _client.auth.currentUser?.id;
if (userId == null) return;
await _client
.from('profiles')
.update({
'terms_accepted_at': DateTime.now().toUtc().toIso8601String(),
'terms_version': version,
})
.eq('id', userId);
}