EasyBannerAd class
A self-managing banner: it loads on mount, reloads when the available width changes (rotation, split screen), disposes itself, and renders nothing at all until an ad is actually on screen.
It deliberately has no refresh timer. Banner refresh is configured on the ad unit in the AdMob dashboard and handled by the SDK while the banner is visible; refreshing from client code both double-counts requests and can breach the 60-second minimum refresh rule.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- EasyBannerAd
Constructors
- EasyBannerAd({Key? key, String? adUnitId, EasyBannerType type = EasyBannerType.anchoredAdaptive, AdSize? fixedSize, EasyBannerCollapse collapse = EasyBannerCollapse.none, double? inlineMaxHeight, Widget? placeholder, void onLoaded(AdSize size)?})
-
Creates a banner.
const
Properties
- adUnitId → String?
-
Overrides the ad unit from the config — useful when different screens
report to different ad units.
final
- collapse → EasyBannerCollapse
-
Requests a collapsible banner. Honoured at most once per session (see
EasyAdsConfig.collapsibleBannerOncePerSession), and only Google demand
fills it — a mediated fill renders as a normal banner.
final
- fixedSize → AdSize?
-
The size to use when type is EasyBannerType.fixed.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inlineMaxHeight → double?
-
Height ceiling for EasyBannerType.inlineAdaptive.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onLoaded → void Function(AdSize size)?
-
Called once the ad renders, with its final size.
final
- placeholder → Widget?
-
Shown while no ad is on screen. Defaults to nothing, so the layout does
not reserve space for an ad that may never fill.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → EasyBannerType
-
How the banner sizes itself.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< EasyBannerAd> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- runtime ↔ AdRuntime?
-
Injected by
EasyAds; not part of the public API.getter/setter pair