BannerAdSize class

Inheritance

Constructors

BannerAdSize({required int width, required int height})
const

Properties

getHeightPx Future<int?>
Obtains the ad height, in pixels. If it fails to be obtained, –1 is returned.
no setter
getWidthPx Future<int?>
Obtains the ad width, in pixels. If it fails to be obtained, –1 is returned.
no setter
hashCode int
The hash code for this object.
no setterinherited
height int
finalinherited
isAutoHeightSize bool
Checks whether an adaptive height is used.
no setter
isDynamicSize bool
Checks whether a dynamic size is used.
no setter
isFullWidthSize bool
Checks whether a full-screen width is used.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width int
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Map args) BannerAdSize
getCurrentDirectionBannerSize(int width) Future<BannerAdSize>
Creates a banner ad size based on the current device orientation and a custom width.
getLandscapeBannerSize(int width) Future<BannerAdSize>
Creates a banner ad size based on a custom width in landscape orientation.
getPortraitBannerSize(int width) Future<BannerAdSize>
Creates a banner ad size based on a custom width in portrait orientation.

Constants

s160x600 → const BannerAdSize
s300x250 → const BannerAdSize
s320x50 → const BannerAdSize
s320x100 → const BannerAdSize
s360x57 → const BannerAdSize
s360x144 → const BannerAdSize
s468x60 → const BannerAdSize
s728x90 → const BannerAdSize
sAdvanced → const BannerAdSize
Adaptive banner size, calculate the appropriate size according to the size of the device and the horizontal and vertical screen state.
sDynamic → const BannerAdSize
Dynamic banner ad dimensions. The width of the parent layout and the height of the ad content are used.
sInvalid → const BannerAdSize
Invalid dimensions. No ad can be requested using the dimensions.
sSmart → const BannerAdSize
Dynamic banner ad dimensions. The screen width and an adaptive height are used.