placementsFor method

List<AdPlacement> placementsFor({
  1. String? path,
  2. String? category,
  3. AdPosition? position,
})

Placements que se aplicam ao contexto dado (página/categoria/posição).

Implementation

List<AdPlacement> placementsFor({
  String? path,
  String? category,
  AdPosition? position,
}) {
  if (!enabled) return const [];
  return placements
      .where(
        (p) =>
            p.matches(path: path, category: category) &&
            (position == null || p.position == position),
      )
      .toList();
}