Funxtion.com|SDK Documentation
Funxtion SDK

Build fitness experiences in minutes

Drop in pre-built UI components for video classes, audio workouts, training plans, and discovery — across Flutter, iOS, and Android.

Flutter — DartiOS 16+ — Swift SPMAndroid API 24+ — Kotlin

Rich UI Components

Workout cards, search, filters, and players — ready to embed.

Analytics Built-in

30+ events tracked automatically. Works with Firebase & Mixpanel.

Multi-language

Six interface languages: English, Arabic (right-to-left), French, Italian, Dutch and Polish. English is the fallback.

Training Finder

AI-powered questionnaire to match users to the right plan.

Theming System

Light/dark mode with full color and typography customization.

Platform support

PlatformLanguageMin versionStatus
FlutterDart ^3.10.0iOS 16.0+, Android API 24+Stable
iOSSwiftiOS 16.0+Stable
AndroidKotlin 2.x (2.1.x recommended)API 24 (Android 7.0)Stable

Requirements

RequirementMinimum
FlutterLatest stable recommended
Dart^3.10.0
PlatformsiOS 16.0+, Android API 24+ (Android 7.0)

Bundle size

~5 MB increase on Android. iOS final app size increase is currently being measured.

Permissions

Android — add to AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

iOS — No Info.plist permission keys required.

Offline support not available

When there is no internet connection, users will see an offline error screen. Content is not cached for offline viewing.

Authentication

The integration token is passed as a parameter during SDK initialisation. On Android the token exists in memory only and is not stored locally. On iOS, how the token is stored is determined by the partner app — it can be passed to the SDK as a parameter.

Security

Certificate pinning is not currently implemented. ProGuard/R8 rules are not required.

Installation

Repository access required

All SDK repositories are private. Your GitHub account must be granted access before any of these installation steps will work — contact support@funxtion.com to request access.

The Flutter SDK is not published on pub.dev. Add it as a git dependency in your pubspec.yaml, pinned to the release tag.

dependencies:
  funxtion:
    git:
      url: https://github.com/Funxtion-International/funxtion-flutter-sdk.git
      ref: v1.1.0

The Flutter SDK provides drop-in UI components for video classes, audio workouts, training plans, and discovery.

DiscoveryVideo ClassesAudio ClassesWorkoutsTraining PlansTraining Finder

Initialize SDK

Call Funxtion.init() with your API key, environment, locale, and analytics configuration.

await Funxtion.init(
  apiKey: 'your-api-key',
  environment: FunxtionEnvironment.staging,
  locale: 'en',
  analyticsConfig: FunxtionAnalyticsConfig(
    callback: (event) => trackEvent(event),
    userIdentification: FXTUserIdentification(
      tenantId: 'your-tenant',
    ),
  ),
);

Add localizations

Add FunxtionLocalizations.delegate to your MaterialApp.

return MaterialApp(
  localizationsDelegates: [
    ...FunxtionLocalizations.delegate,
    GlobalMaterialLocalizations.delegate,
    GlobalCupertinoLocalizations.delegate,
  ],
  home: const FXTDashboardView(),
);

Launch dashboard

Set FXTDashboardView as home in your MaterialApp to launch the full fitness dashboard.

Training Finder

Configure FXTSettings with dashboard sections order and Training Finder settings.

settings: FXTSettings(
  dashboard: FXTDashboardSettings(
    sectionsOrder: [
      FXTDashboardSectionType.trainingFinderCard,
    ],
  ),
  recommend: FXTTrainingFinderSettings(
    showTrainingFinder: true,
  ),
),

Analytics events

A representative selection of the events the SDK tracks — not the complete list. Every event fires automatically and is passed to your analytics callback, so you can forward it to your own tracking tool. For the full event reference, contact support@funxtion.com.

EventTrigger
didOpenVideoClassPlayerUser opens a video class player
didStartWorkoutUser begins a workout session
didCompleteWorkoutUser finishes a workout
didFollowPlanUser starts following a training plan
didCompletePlanUser completes a training plan
didEnterSearchTermUser performs a search query
didFilterWorkoutsUser applies workout filters

Colour system

The SDK uses a DefaultSDKColorScheme that supports light and dark mode. Use copyWith() to override specific tokens:

final customColors = DefaultSDKColorScheme().copyWith(
  textPrimary: Colors.purple,
  surfaceBackgroundBase: Colors.grey[50],
);
FunxtionTheme.setDefaultColors(customColors);

Access tokens in widgets:

final colors = FunxtionTheme.getColors(context);
colors.primaryColor          // Main brand colour
colors.primaryColorLight     // Lighter variant
colors.primaryColorDark      // Darker variant
colors.surfaceBackgroundBase       // Main background
colors.surfaceBackgroundSecondary  // Secondary background
colors.surfaceBackgroundTertiary   // Tertiary background
colors.textEmphasis    // High emphasis text
colors.textSecondary   // Medium emphasis text
colors.textSubtle      // Low emphasis text
colors.borderPrimary   // Primary borders
colors.borderSecondary // Secondary borders

Typography

final fontStyle = FunxtionTheme.getFont(context);

// Available type styles:
fontStyle.titleXL      // 24sp Bold — page titles
fontStyle.titleLG      // 18sp Bold — section titles
fontStyle.titleXS      // 14sp Bold — card titles
fontStyle.paragraphMD  // 14sp Normal — body text
fontStyle.paragraphSM  // 12sp Normal — small text
fontStyle.labelMD      // 14sp Medium — button labels
fontStyle.labelSM      // 12sp Medium — small labels

// Spacing system:
final spacing = FunxtionTheme.getSpacing(context);

Dashboard layout Flutter only

Operators can reorder dashboard sections and buttons. The order of items in the sectionsOrder array determines the render order on the dashboard. Remove a type entirely to hide that section.

FXTSettings(
  dashboard: FXTDashboardSettings(
    sectionsOrder: [
      FXTDashboardSectionType.workout,
      FXTDashboardSectionType.trainingPlan,
      FXTDashboardSectionType.buttons,
      FXTDashboardSectionType.video,
      FXTDashboardSectionType.trainingFinderCard,
      FXTDashboardSectionType.followedTrainingPlan,
    ],
    buttons: [
      FXTDashboardButtonType.trainingPlan,
      FXTDashboardButtonType.video,
      FXTDashboardButtonType.workout,
    ],
    dashboardSearchBar: FXTWidgetSettings(
      backgroundColor: Colors.white,
    ),
  ),
)
Note: This configuration is Flutter-specific. iOS and Kotlin dashboards use a fixed layout with section visibility controlled via feature toggles.

Component shadows Flutter only

Configure shadows on buttons and content cards (workouts, videos, training plans).

// Button shadow
FunxtionTheme.setDefaultButtonShadow([
  FXTShadow(
    color: Color(0xFF000000),
    opacity: 0.5,
  ),
]);

// Content card shadow (workouts, videos, training plans)
FunxtionTheme.setDefaultWidgetShadow([
  FXTShadow(),
]);
Note: Shadow settings currently apply to the dashboard interface only.

Workout player theming

The Flutter workout player inherits from the main colour scheme set via FunxtionTheme.setDefaultColors(). No separate provider is needed.

Support

Need help?

Full API docs at docs.funxtion.com · Email support@funxtion.com · Demo apps available on GitHub for all three platforms.

Example
Initialization
// Initialize the SDK
await Funxtion.init(
  apiKey: 'your-api-key',
  environment: FunxtionEnvironment.staging,
  locale: 'en',
  analyticsConfig: FunxtionAnalyticsConfig(
    enabled: true,
    callback: (event) {
      FirebaseAnalytics.logEvent(event);
    },
    userIdentification:
      FXTUserIdentification(
        tenantId: 'your-tenant',
      ),
  ),
);
Dashboard
return MaterialApp(
  localizationsDelegates: [
    ...FunxtionLocalizations.delegate,
    GlobalMaterialLocalizations.delegate,
  ],
  home: const FXTDashboardView(),
);