requestData static method

Future requestData({
  1. NsgDataRequestParams? filter,
  2. bool autoAuthorize = true,
  3. String? tag,
  4. String function = '',
  5. String method = 'GET',
  6. dynamic postData,
  7. required NsgDataProvider dataProvider,
})

Implementation

static Future<dynamic> requestData({
  NsgDataRequestParams? filter,
  bool autoAuthorize = true,
  String? tag,
  String function = '',
  String method = 'GET',
  dynamic postData,
  required NsgDataProvider dataProvider,
}) async {
  var filterMap = <String, dynamic>{};
  if (filter != null) filterMap = filter.toJson();

  function = dataProvider.serverUri + function;
  var response = await dataProvider.baseRequestList(
      function: function, headers: dataProvider.getAuthorizationHeader(), url: function, method: method, params: filterMap, postData: postData);

  return response;
}