PcoCheckInsLocationQuery constructor

PcoCheckInsLocationQuery({
  1. bool includeEvent = false,
  2. bool includeLocations = false,
  3. bool includeOptions = false,
  4. bool includeParent = false,
  5. bool includeAllRelated = false,
  6. PcoCheckInsLocationOrder? orderBy,
  7. bool reverse = false,
  8. int perPage = 25,
  9. int pageOffset = 0,
  10. Map<String, String> extraParams = const {},
  11. List<PlanningCenterApiWhere>? where,
  12. Iterable<String> filter = const <String>[],
  13. String? order,
  14. Iterable<String> include = const <String>[],
})

Implementation

PcoCheckInsLocationQuery({
  /// include associated event
  /// when true, adds `?include=event` to url
  bool includeEvent = false,

  /// include associated locations
  /// when true, adds `?include=locations` to url
  bool includeLocations = false,

  /// include associated options
  /// when true, adds `?include=options` to url
  bool includeOptions = false,

  /// include associated parent
  /// when true, adds `?include=parent` to url
  bool includeParent = false,

  /// when true, adds `?include=event,locations,options,parent` to url parameters
  bool includeAllRelated = false,
  PcoCheckInsLocationOrder? orderBy,

  /// reverse the ordering
  bool reverse = false,

  // direct access to super class params
  super.perPage,
  super.pageOffset,
  super.extraParams,
  super.where,
  super.filter,
  super.order,
  super.include,
}) : super() {
  if (includeAllRelated || includeEvent) include.add('event');
  if (includeAllRelated || includeLocations) include.add('locations');
  if (includeAllRelated || includeOptions) include.add('options');
  if (includeAllRelated || includeParent) include.add('parent');

  if (orderBy != null) order = orderString(orderBy, reverse: reverse);
}