NativeAdStyleBuilder class
Builder class for creating NativeAdStyle instances with a fluent API.
Example:
final style = NativeAdStyleBuilder()
.setBackgroundColor(Colors.white)
.setCornerRadius(12.0)
.setPadding(EdgeInsets.all(16))
.setHeadlineStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Colors.black87,
)
.setCallToActionStyle(
NativeAdButtonStyle(
backgroundColor: Colors.blue,
textColor: Colors.white,
),
)
.build();
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
-
build(
) → NativeAdStyle - Builds and returns the NativeAdStyle instance.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setAdvertiserStyle(
{double? fontSize, FontWeight? fontWeight, Color? color, double? letterSpacing, double? height}) → NativeAdStyleBuilder - Sets the text style for the advertiser name.
-
setAttributionStyle(
NativeAdAttributionStyle style) → NativeAdStyleBuilder - Sets the ad attribution label style.
-
setBackgroundColor(
Color color) → NativeAdStyleBuilder - Sets the background color of the ad container.
-
setBodyStyle(
{double? fontSize, FontWeight? fontWeight, Color? color, double? letterSpacing, double? height}) → NativeAdStyleBuilder - Sets the text style for the body text.
-
setBorder(
Border border) → NativeAdStyleBuilder - Sets the border configuration.
-
setCallToActionStyle(
NativeAdButtonStyle style) → NativeAdStyleBuilder - Sets the call to action button style.
-
setCornerRadius(
double radius) → NativeAdStyleBuilder - Sets the corner radius for the ad container.
-
setHeadlineStyle(
{double? fontSize, FontWeight? fontWeight, Color? color, double? letterSpacing, double? height}) → NativeAdStyleBuilder - Sets the text style for the headline.
-
setMargin(
EdgeInsets margin) → NativeAdStyleBuilder - Sets the margin around the entire ad view.
-
setMediaStyle(
NativeAdMediaStyle style) → NativeAdStyleBuilder - Sets the media view configuration.
-
setPadding(
EdgeInsets padding) → NativeAdStyleBuilder - Sets the padding inside the ad container.
-
setPriceStyle(
{double? fontSize, FontWeight? fontWeight, Color? color, double? letterSpacing, double? height}) → NativeAdStyleBuilder - Sets the text style for the price.
-
setStarRatingColor(
Color color) → NativeAdStyleBuilder - Sets the star rating bar color.
-
setStoreStyle(
{double? fontSize, FontWeight? fontWeight, Color? color, double? letterSpacing, double? height}) → NativeAdStyleBuilder - Sets the text style for the store name.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited