login_service.dart 506 B

123456789101112131415161718
  1. import '../data/api_response.dart';
  2. import 'base_service.dart';
  3. import '../models/login_model.dart';
  4. class LoginService extends BaseService {
  5. final endPoint = "/v1/iniciar-sesion";
  6. Future<ApiResponse> logIn(String correo, String password) async {
  7. final login = Login(correo: correo, password: password);
  8. var response = await post(endPoint,
  9. withAuth: false,
  10. body: login.toJson(),
  11. headers: {'Content-Type': 'application/json'});
  12. return ApiResponse(response);
  13. }
  14. }