profile dependencies added
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import 'package:tm_app/data/services/model/profile_response/profile_response.dart';
|
||||
|
||||
import '../../core/network/network_manager.dart';
|
||||
import '../../core/utils/result.dart';
|
||||
|
||||
class ProfileService {
|
||||
ProfileService({required NetworkManager networkManager})
|
||||
: _networkManager = networkManager;
|
||||
|
||||
final NetworkManager _networkManager;
|
||||
|
||||
Future<Result<ProfileResponse>> getProfile() async {
|
||||
final result = await _networkManager.makeRequest(
|
||||
'/admin/v1/profile',
|
||||
method: 'GET',
|
||||
(json) => ProfileResponse.fromJson(json),
|
||||
);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user