appsflyer_helper_init

A lightweight Flutter plugin that provides a smooth loading experience with AppsFlyer conversion data integration. Shows a loading screen while initializing AppsFlyer, awaiting conversion data, and performing a remote configuration check in the background.

Features

  • Awaits AppsFlyer conversion data before proceeding
  • Sends full conversion data as a query parameter to the server
  • Customizable loading screen with remote image support
  • Background initialization and configuration checks
  • AppsFlyer SDK integration with custom user ID
  • Smooth fade animations during loading
  • Automatic caching for faster subsequent launches
  • Configurable conversion data timeout
  • Embedded in-app WebView fallback for redirects
  • Debug mode for development

Getting Started

Wrap your app with AfHelperGate to add a loading screen:

import 'package:flutter/material.dart';
import 'package:appsflyer_helper_init/appsflyer_helper_init.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(
    AfHelperGate(
      config: const AfHelperConfig(
        baseAddress: 'https://your-app.com',
        configKey: 'your-config-key',
        imagePath: '/images/splash.jpg',
        appsFlyerDevKey: 'YOUR_APPSFLYER_DEV_KEY',
        appsFlyerAppId: 'YOUR_APPLE_APP_ID',
      ),
      child: const MyApp(),
    ),
  );
}

Configuration

Parameter Description Default
baseAddress Base address for loading resources required
configKey Configuration key for the app required
imagePath Path to the loading image required
appsFlyerDevKey AppsFlyer dev key for SDK initialization required
appsFlyerAppId Apple App ID for AppsFlyer required
conversionDataTimeoutSeconds Timeout for waiting on conversion data 30
imageDownloadTimeoutSeconds Timeout for image download 10
debugMode Enable debug logging false

Platform Support

Platform Support
iOS Yes