/*
 * @Descripttion: 我的常规EasyRefresh请求接口
 * @version: 
 * @Author: wy
 * @Date: 2020-08-25 16:58:32
 * @LastEditors: wangyang 1147192855@qq.com
 * @LastEditTime: 2022-07-18 21:09:08
 */

import 'package:flutter_easyrefresh/easy_refresh.dart';

class MyEasyRefreshService{
  // MyEasyRefreshService._() : super();

  // static MyEasyRefreshService _instance;

  // static MyEasyRefreshService getInstance() {
  //   if (_instance == null) {
  //     _instance = MyEasyRefreshService._();
  //   }
  //   return _instance;
  // }

  static Future findList(
      context,
      EasyRefreshController _controller,
      bool isRefresh,
      String url,
      Map<String, dynamic> params,
      bool widthToken,
      Function call,
      {bool conMonitor = true}) async {
    if (widthToken) {
      // await Request.post(context, url, params).then((res) {
      //   List list = res["result"];
      //   call(list, res["code"] == 0);
      //   BaseService.controlController(context, isRefresh, _controller, list);
      // });
    } else {
      // await Request.postNotToken(context, url, params).then((res) {
      //   List list = res["result"];
      //   call(list, res["code"] == 0);
      //   BaseService.controlController(context, isRefresh, _controller, list);
      // });
    }
  }
}
