TBLClassicUnit constructor
TBLClassicUnit(
- String _publisherId,
- String _mode,
- String _placement,
- String _pageUrl,
- String _pageType,
- String _pageId,
- String _targetType,
- bool _isFeed,
- TBLClassicListener _tblClassicListener,
- HashMap<
String, String> _unrecognizedPageExtraProperties, - TBLTrackingManager _tblTrackingManager,
- TBLEventsManager _tblEventsManager, {
- Key? key,
- int? viewId,
- ScrollController? scrollController,
- bool? keepAlive,
- Future<
bool> ? isWarmedUpWebview,
Implementation
TBLClassicUnit(
this._publisherId,
this._mode,
this._placement,
this._pageUrl,
this._pageType,
this._pageId,
this._targetType,
this._isFeed,
this._tblClassicListener,
this._unrecognizedPageExtraProperties,
this._tblTrackingManager,
this._tblEventsManager, {
Key? key,
int? viewId,
ScrollController? scrollController,
bool? keepAlive,
Future<bool>? isWarmedUpWebview,
}) : this.scrollController = scrollController ??= ScrollController(),
this._viewId = viewId ?? TBLWebviewUtils.generateViewId() {
PlatformWebViewControllerCreationParams
platformWebViewControllerCreationParams =
TBLWebviewUtils.createPlatformWebViewControllerCreationParams();
// drill down the page extra properties to the unit
// To ensure that the TBLClassicUnit is initialized with the correct unit extra props, we're using setUnitExtraProps here.
// Calling setUnitExtraProps within _initialize would be problematic on iOS, as we wait for isWarmedUpWebview to be completed.
// This delay could lead to the constructor's setUnitExtraProps call overriding the initial values set in the publisher's.
setUnitExtraProps(_unrecognizedPageExtraProperties);
_initialize(platformWebViewControllerCreationParams, isWarmedUpWebview);
}