network manager and di added
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
import 'network_manager.dart';
|
||||
|
||||
class AuthService {
|
||||
AuthService({required NetworkManager networkManager})
|
||||
: _networkManager = networkManager;
|
||||
|
||||
final NetworkManager _networkManager;
|
||||
|
||||
Future<Map<String, dynamic>> login(String email, String password) async {
|
||||
// شبیهسازی API Call
|
||||
await Future.delayed(const Duration(seconds: 2));
|
||||
@@ -10,3 +17,20 @@ class AuthService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Future<Result<OnlineGalleryResponse>> getImages(String projectId) async {
|
||||
// try {
|
||||
// final result = await networkManager.makeRequest(
|
||||
// '/api/v1/projects/$projectId/files',
|
||||
// (json) {
|
||||
// Logger().i(json);
|
||||
// return OnlineGalleryResponse.fromJson(json);
|
||||
// },
|
||||
// method: 'GET',
|
||||
// );
|
||||
|
||||
// return Result.ok(result);
|
||||
// } on DioException catch (e) {
|
||||
// return Result.error(e);
|
||||
// }
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user