list method Null safety

Future<IFactSchemaList> list(
  1. {double? limit,
  2. double? offset}
)
override

Implementation

Future<IFactSchemaList> list({double? limit, double? offset}) async {
  final builder = RequestBuilder();
  builder.body = null;
  // create path and map variables
  // create path and map variables
  builder.path = "/sunny/0.0.1/factSchema/factSchema";
  builder.queryParams["limit"] = limit;
  builder.queryParams["offset"] = offset;
  List<String> contentTypes = [];
  String contentType =
      contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
  builder.contentType = contentType;
  builder.basePath = apiClient.basePaths["fact_schemas"];
  builder.method = HttpMethod.GET;

  final response = await apiClient.invokeRequest(builder);
  final value = json.decode(response.body);
  return IFactSchemaList.fromJson(value);
}