NativeAd class

Creates a NativeAd and add it to the widget tree. Uses a PlatformView to connect to the AdView in the platform

Inheritance

Constructors

NativeAd({Key? key, AdBuilder? builder, NativeAdController? controller, required NativeSize size, required String nativeSizeType, required String action_button_background_color, required String action_button_text_color, NativeAdOptions options = const NativeAdOptions(), Widget? error, Widget? loading, Duration? delayToShow, Duration loadTimeout = kDefaultLoadTimeout, bool nonPersonalizedAds = kDefaultNonPersonalizedAds, bool? useHybridComposition, List<String> keywords = const []})
const

Properties

action_button_background_color String
final
action_button_text_color String
final
builder AdBuilder?
For more info, visit the documentation
final
controller NativeAdController?
For more info, visit the documentation
final
delayToShow Duration?
The duration the platform view will wait to be shown.
final
error Widget?
The error placeholder. If an error happens, this widget will be shown
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keywords List<String>
final
loading Widget?
The loading placeholder. This widget will be shown while the ad is loading
final
loadTimeout Duration
The ad will stop loading after a specified time.
final
nativeSizeType String
final
nonPersonalizedAds bool
final
options NativeAdOptions
The options this ad will follow.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size NativeSize
final
useHybridComposition bool?
If null, defaults to MobileAds.useHybridComposition
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _NativeAdState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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