BannerSize class Null safety
The size of a BannerAd. It's highly recommended to use BannerSize.ADAPTIVE when creating your BannerAds
Constructors
- BannerSize(Size size)
-
Creates a new Banner Size. To create a custom size from
height and width, use BannerSize.fromWH(width, height)
const
- BannerSize.fromWH(double width, double height)
-
Creates banner ad with a custom size from
width
andheight
. Keep in mind that the ad may not fit well with custom sizesfactory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- ADAPTIVE → const BannerSize
-
Adaptive banners are the next generation of responsive ads,
maximizing performance by optimizing ad size for each device.
Improving on smart banners, which only supported fixed heights,
adaptive banners let developers specify the ad-width and use
this to determine the optimal ad size.
BannerSize(Size(-1, -1))
- BANNER → const BannerSize
-
Standart banner.
Creates a banner of320w
x50h
BannerSize(Size(320, 50))
- FULL_BANNER → const BannerSize
-
Full banner.
Creates a banner of468w
x60h
Avaiable only on TabletsBannerSize(Size(468, 60))
- LARGE_BANNER → const BannerSize
-
Large banner.
Creates a banner of320w
x100h
BannerSize(Size(320, 100))
- LEADERBOARD → const BannerSize
-
LEADERBOARD.
Creates a banner of728w
x90h
BannerSize(Size(728, 90))
- MEDIUM_RECTANGLE → const BannerSize
-
Medium Rectangle.
Creates a banner of320w
x250h
Avaiable only on TabletsBannerSize(Size(320, 250))
- SMART_BANNER → const BannerSize
-
Smart Banners are ad units that render screen-width banner
ads on any screen size across different devices in either
orientation. Smart Banners detect the width of the device
in its current orientation and create the ad view that size.
@Deprecated('Smart banner is deprecated in favor of adaptive banner')
BannerSize(Size(-1, -2))