dynamix_flutter_sdk 0.0.5
dynamix_flutter_sdk: ^0.0.5 copied to clipboard
This is SDK for Dynamix, for in app notifications
Dynamix Flutter SDK #
Dynamix Flutter SDK is a Flutter package that provides easy integration for displaying in-app templates and widgets.
Installation #
Add the following to your pubspec.yaml
file:
dependencies:
dynamix_flutter_sdk: ^0.0.3
Run:
flutter pub get
Initialization #
Initialize the SDK before using it:
TemplateSdk.instance.initialize();
Usage #
Showing Templates on the Dashboard #
Call this inside WidgetsBinding.instance.addPostFrameCallback
to display templates:
WidgetsBinding.instance.addPostFrameCallback((_) {
// Show app_open templates only on dashboard
TemplateSdk.instance.showAppOpenTemplates(context);
// Also show dashboard screen templates
TemplateSdk.instance.showScreenTemplates(context, 'ScreenName');
});
Displaying In-App Widget #
Use the inAppWidgetContainer
method to display in-app widgets:
TemplateSdk.instance.inAppWidgetContainer(
screenName: 'ScreenName',
height: 250,
padding: const EdgeInsets.all(16),
);
License #
This project is licensed under the MIT License - see the LICENSE file for details.