refactor(profile): update ProfileRepository to include Ref for improved state management and enhance error handling in tests
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user