import 'package:dio/dio.dart';
import '../model/course_model.dart';

class RemoteCourse{
  Future<CourseModel?> getCourseModel() async{
    var dio = Dio();
    String url = ("https://imes-api.myitsol.com/api/v1/public/search-courses");
    var response = await dio.get(url);
    if(response.statusCode == 200){
      var json = response.data;
      return CourseModel.fromJson(json);
    }
    return null;
  }
}