SDKs/Flutter / Dart
developer_board Official SDK · iOS · Android · Web · Desktop
Coming Soon

WorkoutX Flutter & Dart SDK

The official Dart package for the WorkoutX API. Ship cross-platform fitness apps from one codebase — 1,400+ exercises with GIF animations, the AI Workout Generator, supplements, and the Body Scan API. Runs on Flutter for iOS, Android, web, and desktop.

flutter pub add workoutx_sdk

📦 Publishing to pub.dev shortly — not yet installable. Get your key now and you'll be ready the moment it lands.

Quick start

One client covers both products — the Exercise API (API-key auth) and the Body Scan API (user JWT). The SDK attaches the right credential automatically.

import 'package:workoutx_sdk/workoutx_sdk.dart'; final wx = WorkoutX( apiKey: 'wx_your_key_here', scan: const ScanAuth.token('eyJ...'), // body scan (optional) ); // Exercises final page = await wx.exercises.list(limit: 20); final lunges = await wx.exercises.byName('lunges'); final similar = await wx.exercises.similar('0001'); // Exercise GIF — Image.network(wx.gifUrl('0001')) final bytes = await wx.gifs.get('0001'); final src = wx.gifUrl('0001'); // AI Workout Generator final workout = await wx.workout.generate({'goal': 'hypertrophy', 'days': 4}); // Body Scan final credits = await wx.scan.credits();
devices

One codebase, every platform

iOS, Android, web, and desktop from a single Dart package. Display GIFs directly with Image.network(wx.gifUrl(id)).

shield

Resilient by default

Automatic retries with backoff on 429 and 5xx, honoring Retry-After. Structured WorkoutXError with status, code and tips.

dataset

Both products, one client

Exercises, GIFs, workouts, supplements and Body Scan — all under wx.*. Auth handled transparently per product.

Look up an exercise by name or ID — safely

Exercise IDs are not sequential, so passing a human name to get() returns a 404. The find() helper tries an ID first, then falls back to a name search.

final ex = await wx.exercises.find('lunges'); // Exercise?

Frequently asked questions

How do I install the WorkoutX Flutter SDK?

Run flutter pub add workoutx_sdk (or dart pub add workoutx_sdk for a Dart-only project), then import package:workoutx_sdk/workoutx_sdk.dart.

Which platforms does it support?

All Flutter targets: iOS, Android, web, macOS, Windows, and Linux. It also works in plain Dart projects.

How do I display an exercise GIF in Flutter?

Pass wx.gifUrl('0001') straight to Image.network(...), or fetch raw bytes with wx.gifs.get('0001').

How does authentication work for the Body Scan API?

Body Scan uses a logged-in user's JWT. Pass scan: ScanAuth.token('...'), or ScanAuth.credentials(email:, password:) to let the SDK log in automatically.

Security & API keys

vpn_key

Keys are visible in apps

Keys compiled into a mobile or web build can be extracted. For production, proxy requests through your own backend or use a restricted, rotatable key rather than a full-access one.

image

GIF URLs carry the key

gifUrl() puts the key in the query string so Image.network can load it. Since URLs can leak via logs and referrers, use a separate, restricted key for GIFs where possible.

lock

Use tokens, not credentials

For Body Scan, fetch a short-lived JWT from your backend and pass ScanAuth.token(...). Avoid shipping the email/password login flow inside the app.

Start building with Flutter

Free tier included. 1,400+ exercises, GIFs, workouts, and Body Scan in one package.

Get your free API key