BaseRequest.makeRequest constructor

BaseRequest.makeRequest(
  1. Map<String, dynamic> properties
)

Implementation

factory BaseRequest.makeRequest(Map<String, dynamic> properties) {
  final stringProperties = <String, String>{};
  final listProperties = <String, List<String>>{};
  properties.forEach((key, value) {
    if (!keysToRemove.contains(key)) {
      if (value is List<dynamic>) {
        listProperties[key] = value.map((e) => e.toString()).toList();
      } else {
        stringProperties[key] = value.toString();
      }
    }
  });
  return BaseRequest(stringProperties, listProperties);
}