AdFeedWidget class

信息流广告Widget

Inheritance

Constructors

AdFeedWidget({Key? key, required String posId, required int adId, double width = 375, double height = 125, bool isVisible = true, VoidCallback? onAdLoaded, dynamic onAdError(String error)?, VoidCallback? onAdClicked, VoidCallback? onAdClosed, VoidCallback? onAdRenderSuccess, dynamic onAdRenderFail(String error)?})
const

Properties

adId int
广告数据ID(从loadFeedAd返回的ID)
final
hashCode int
The hash code for this object.
no setterinherited
height double
高度
final
isVisible bool
是否可见
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onAdClicked VoidCallback?
点击回调
final
onAdClosed VoidCallback?
关闭回调
final
onAdError → dynamic Function(String error)?
错误回调
final
onAdLoaded VoidCallback?
加载回调
final
onAdRenderFail → dynamic Function(String error)?
渲染失败回调
final
onAdRenderSuccess VoidCallback?
渲染成功回调
final
posId String
广告位ID
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width double
宽度
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<AdFeedWidget>
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, int wrapWidth = 65}) 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