isRepeatRequest method

Map? isRepeatRequest({
  1. required String method,
})

Implementation

Map<dynamic, dynamic>? isRepeatRequest({required String method}) {
  bool isContain = requestQueue.any((element) => (element == method)) /*!*/;
  if (isContain) {
    Map map = {
      j_flutter_code_key: j_flutter_error_code_repeat,
      j_flutter_msg_key: method + " is requesting, please try again later."
    } /*!*/;
    print(flutter_log + map.toString());
    return map;
  } else {
    requestQueue.add(method);
    return null;
  }
}