BannerSize class Null safety

The size of a BannerAd. It's highly recommended to use BannerSize.ADAPTIVE when creating your BannerAds


BannerSize(Size size)
Creates a new Banner Size. To create a custom size from height and width, use BannerSize.fromWH(width, height)
BannerSize.fromWH(double width, double height)
Creates banner ad with a custom size from width and height. Keep in mind that the ad may not fit well with custom sizes


hashCode int
The hash code for this object.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
size Size
The Size of the Banner.


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
toString() String
A string representation of this object.


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


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))
Standart banner.
Creates a banner of 320wx50h
BannerSize(Size(320, 50))
FULL_BANNER → const BannerSize
Full banner.
Creates a banner of 468wx60h
Avaiable only on Tablets
BannerSize(Size(468, 60))
LARGE_BANNER → const BannerSize
Large banner.
Creates a banner of 320wx100h
BannerSize(Size(320, 100))
LEADERBOARD → const BannerSize
Creates a banner of 728wx90h
BannerSize(Size(728, 90))
MEDIUM_RECTANGLE → const BannerSize
Medium Rectangle.
Creates a banner of 320wx250h
Avaiable only on Tablets
BannerSize(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))