refactor(profile): update ProfileRepository to include Ref for improved state management and enhance error handling in tests

This commit is contained in:
Nils-Johan Gynther
2026-04-23 17:55:17 +02:00
parent aefc8804ad
commit 2256ddb29b
3 changed files with 14 additions and 5 deletions
+6 -1
View File
@@ -1,5 +1,6 @@
import 'dart:convert';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:http/http.dart' as http;
import 'api_exception.dart';
@@ -128,4 +129,8 @@ class ApiClient {
if (parsedBody is String && parsedBody.trim().isNotEmpty) return parsedBody;
return null;
}
}
}
final apiClientProvider = Provider<ApiClient>((ref) {
return ApiClient();
});