Migrating from Flutter plugin 0.x

⚠️

Deprecation Notice

You are viewing the SDK v3 docs. SDK v3 will be deprecated on September 30, 2026.

We recommend upgrading to SDK v4 — the latest and actively maintained version. To get started, follow the SDK v3 → v4 Migration Guide.

Overview

A number of objects and methods have changed in version 1.x of the Taboola Flutter plugin.

When migrating your app from version 0.x, refer to the checklist below.

📘

Guidelines

  1. Update import statements to use the new package names.
  2. Rename relevant objects.
  3. Rename callback methods.
  4. Rename the getTaboolaClassicBuilder() method.
  5. Ensure that you invoke init() with a single param.
  6. To pass extraProperties, invoke a setter at the appropriate level: Taboola, TBLClassicPage or TBLClassicUnit.

Checklist

v0.x

v1.x

// Packages to import:

'taboola_sdk/taboola.dart'; 'taboola_sdk/classic/classic.dart'; 'taboola_sdk/classic/classic_listener.dart';

// Packages to import:

'taboola_sdk/taboola.dart';
'taboola_sdk/classic/tbl_classic.dart';
'taboola_sdk/classic/tbl_classic_page.dart';
'taboola_sdk/classic/tbl_classic_listener.dart';

PublisherInfo

TBLPublisherInfo

TaboolaClassicListener

TBLClassicListener

// Callback method:
taboolaDidResize()

// Callback method:
onResize()

// Callback method:
taboolaDidShow()

// Callback method:
onAdReceiveSuccess()

// Callback method:
taboolaDidFailToLoad()

// Callback method:
onAdReceiveFail()

// Callback method:
taboolaDidClickOnItem()

// Callback method:
onItemClick()

// Old signature (WITH optional extraProperties param):

Taboola.init(PublisherInfo(publisher), extraProperties: extraProperties);

// New signature:

Taboola.init(TBLPublisherInfo(publisher));

// (See above)

// Global setter for extra properties:

Taboola.setGlobalExtraProperties(HashMap<String, dynamic> extraProperties)

// (See above)

// Page-level setter for extra properties:

TBLClassicPage.setPageExtraProperties(HashMap<String, dynamic> extraProperties)

// (See above)

// Unit-level setter for extra properties:

TBLClassicUnit.setUnitExtraProps(HashMap<String, dynamic> extraProperties)

TaboolaClassicBuilder

TBLClassicPage

getTaboolaClassicBuilder() // method

getClassicPage() // method

TaboolaClassicUnit

TBLClassicUnit