SplashAdLoader class

Coordinates SDK initialization, a splash-ad request and the app's first UI.

The widget is intended for the application's root page. It shows loadingBuilder from Flutter's first frame, then displays child after the ad is dismissed or when initialization/loading fails. Set hotStartInterval to also request a splash ad after the app returns from the background, subject to the interval since the last displayed splash ad.

Inheritance

Constructors

SplashAdLoader({Key? key, required Widget child, required String appId, required String posId, SplashLoadingBuilder? loadingBuilder, double timeout = 3.5, String? appName, bool useTextureView = false, bool supportMultiProcess = false, bool allowShowNotify = true, List<int> directDownloadNetworkType = const <int>[], String? personalAdsType, VoidCallback? onInitSuccess, void onInitError(AdRequestError error)?, VoidCallback? onLoad, void onError(AdRequestError error)?, VoidCallback? onShow, VoidCallback? onClick, VoidCallback? onClosed, Duration? hotStartInterval})
const

Properties

allowShowNotify bool
final
appId String
ADP application id used to initialize the SDK.
final
appName String?
final
child Widget
The application's normal first page.
final
directDownloadNetworkType List<int>
final
hashCode int
The hash code for this object.
no setterinherited
hotStartInterval Duration?
Minimum time between two successfully displayed splash ads. On a hot start, the splash request is made immediately when this interval has elapsed. null disables hot-start splash ads.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadingBuilder SplashLoadingBuilder?
Custom Flutter loading UI. A compact progress screen is used by default.
final
final
onClick VoidCallback?
final
onClosed VoidCallback?
final
onError → void Function(AdRequestError error)?
final
onInitError → void Function(AdRequestError error)?
final
onInitSuccess VoidCallback?
final
onLoad VoidCallback?
final
onShow VoidCallback?
final
personalAdsType String?
Optional personalization setting applied after SDK initialization.
final
posId String
Splash-ad placement id.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportMultiProcess bool
final
timeout double
final
useTextureView bool
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<SplashAdLoader>
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