import 'package:supabase_flutter/supabase_flutter.dart';

class SupabaseService {

  SupabaseService(SupabaseClient client);

  Future<Map<String, dynamic>?> getDiseaseByName(String name) async {
  try {
    final response = await Supabase.instance.client
        .from('diseases')
        .select()
        .eq('name', name)
        .maybeSingle();

    if (response == null) {
      return null;
    }

    return response as Map<String, dynamic>?;
  } catch (e) {
    print('Error fetching disease: $e');
    return null;
  }
}
}
