getNotificationList abstract method

  1. @GET(Api.notificationsList)
Future<NotificationModel> getNotificationList({
  1. @Query("sort") required String sort,
  2. @Query("userId") String? userId,
  3. @Query("fromDate") String? fromDate,
  4. @Query("toDate") String? toDate,
  5. @Query("keyword") String? keyword,
  6. @Query("order") String order = "dsc",
  7. @Query("page") int? page,
  8. @Query("size") int? size,
  9. @Header("X-User-Id") String xUserId = "",
  10. @Header("content-type") String type = "applicatin/json",
})

Implementation

@GET(Api.notificationsList)
Future<NotificationModel> getNotificationList({
  @Query("sort") required String sort,
  @Query("userId") String? userId,
  @Query("fromDate") String? fromDate,
  @Query("toDate") String? toDate,
  @Query("keyword") String? keyword,
  @Query("order") String order = "dsc",
  @Query("page") int? page,
  @Query("size") int? size,
  @Header("X-User-Id") String xUserId = "",
  @Header("content-type") String type = "applicatin/json",
});