NativeAdTemplate enum
Native ad template types for predefined layouts.
These templates provide consistent, optimized layouts for different ad placement scenarios in your app.
Values
- small → const NativeAdTemplate
-
Small template with minimal content.
Best for inline placements in lists or compact spaces. Typically shows headline, body text, and small icon. Recommended height: 100-150dp
- medium → const NativeAdTemplate
-
Medium template with balanced image and text content.
Perfect for feed-style layouts or content breaks. Displays headline, body, media preview, and call-to-action button. Recommended height: 250-350dp
- large → const NativeAdTemplate
-
Large template with prominent media display.
Best for immersive ad experiences or featured placements. Shows full media, headline, extended body text, and prominent CTA. Recommended height: 350-500dp
- custom → const NativeAdTemplate
-
Custom template for advanced customization.
Use this when you need full control over the ad appearance. Must be used in conjunction with NativeAdStyle for styling. Allows mixing template structure with custom styling overrides.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - 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
Constants
-
values
→ const List<
NativeAdTemplate> - A constant List of the values in this enum, in order of their declaration.