AdPlacement class

Uma regra de anúncio: qual unidade (slot) e ONDE ela aparece (por caminho e/ou por categoria). Listas vazias = sem restrição naquele eixo.

Ex.: AdPlacement(slot: '123', categories: ['Tecnologia']) → só nas páginas da categoria Tecnologia. AdPlacement(slot: '999', paths: ['/']) → só na home.

Constructors

AdPlacement({required String slot, AdPosition position = AdPosition.inContent, List<String> paths = const [], List<String> categories = const [], String format = 'auto', String? html})
const
AdPlacement.custom(String? html, {AdPosition position = AdPosition.inContent, List<String> paths = const [], List<String> categories = const []})
Anúncio custom (HTML/embed) em vez de uma unidade do AdSense.
const

Properties

categories List<String>
Categorias onde aparece (ex.: ['Tecnologia']). Vazio = qualquer categoria.
final
format String
Formato do AdSense (auto, fluid, rectangle...).
final
hashCode int
The hash code for this object.
no setterinherited
html String?
HTML do anúncio custom (nulo = usa AdSense com slot).
final
paths List<String>
Caminhos onde aparece (ex.: ['/', '/blog']). Vazio = qualquer caminho.
final
position AdPosition
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
slot String
final

Methods

matches({String? path, String? category}) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited