AdDimensionUtils class
Utility class for calculating ad dimensions with proper fallback logic.
Implements the same logic as native Android and iOS SDKs: Priority: User input → API response → Screen * 0.8 Then clamps to maximum of screen * 0.8
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Static Methods
-
calculateDimensions(
{required BuildContext context, double? userWidth, double? userHeight, required Map< String, dynamic> adData, bool? isIOS, List<String> ? apiWidthPath, List<String> ? apiHeightPath, double screenPercent = 1.0}) → Map<String, double> - Calculates width and height for ads with proper fallback logic.