Skip to main content

Embedding Banners

The Nudge SDK allows seamless integration of dynamic banners into your Flutter application, enabling personalized and interactive user engagement.

Importing the Package

Ensure that nudgecore_v2 is imported in your Dart file:

import 'package:nudgecore_v2/nudgecore_v2.dart';

Embedding a Nudge Banner

To embed a banner within your Flutter UI, use the NudgeAppComponent widget. This widget dynamically renders the banner based on the specified widget ID.

Usage Example:

NudgeAppComponent(id: 'home_page_banner')

Parameters:

  • id (String) - The unique identifier of the banner component as configured in the Nudge dashboard.

Integration Notes:

  • Ensure that the widget ID matches the one defined in your Nudge campaign.
  • Place NudgeAppComponent within an appropriate widget tree to ensure visibility.
  • The banner content is dynamically fetched and updated based on campaign settings.