small fix, don't worry about it

This commit is contained in:
Tomas Dvorak
2026-04-10 12:05:40 +02:00
parent 7b7ed0083f
commit 5ab2773f98
55 changed files with 3240 additions and 483 deletions
@@ -1,6 +1,7 @@
import 'package:supabase_flutter/supabase_flutter.dart' as supabase;
import '../models/user_model.dart' as app;
import '../../core/errors/failure.dart';
import '../../core/utils/unit_conversion_utils.dart';
class UserRepository {
final supabase.SupabaseClient _client;
@@ -35,6 +36,12 @@ class UserRepository {
String? instagramHandle,
String? tiktokHandle,
String? websiteUrl,
Gender? gender,
DateTime? birthDate,
double? heightCm,
double? weightKg,
HeightUnit heightUnit = HeightUnit.metric,
WeightUnit weightUnit = WeightUnit.metric,
}) async {
try {
final updates = <String, dynamic>{};
@@ -46,6 +53,12 @@ class UserRepository {
if (instagramHandle != null) updates['instagram_handle'] = instagramHandle;
if (tiktokHandle != null) updates['tiktok_handle'] = tiktokHandle;
if (websiteUrl != null) updates['website_url'] = websiteUrl;
if (gender != null) updates['gender'] = gender.toDatabaseString();
if (birthDate != null) updates['birth_date'] = birthDate.toIso8601String().split('T').first;
if (heightCm != null) updates['height_cm'] = heightCm;
if (weightKg != null) updates['weight_kg'] = weightKg;
updates['height_unit'] = heightUnit.code;
updates['weight_unit'] = weightUnit.code;
updates['updated_at'] = DateTime.now().toIso8601String();
final response = await _client