api_studio 1.0.3
api_studio: ^1.0.3 copied to clipboard
A powerful in-app API debugging and inspection tool for Flutter. Supports Dio interception, persistent logs, edit-and-run, CURL export, and a beautiful inspector dashboard.
API Studio
A powerful all-in-one Flutter developer toolkit for
API Debugging • Monitoring • Testing • Performance Analysis • Developer Utilities
API Studio embeds a full HTTP client, a real-time API inspector, a lightweight performance monitor, and a file explorer directly inside your running app. It's built for Flutter developers and QA engineers who need to debug network traffic, replay requests, and check performance without leaving the app or reaching for external tooling.
✅ Features at a Glance #
| Feature | Status |
|---|---|
| HTTP Client (GET / POST / PUT / PATCH / DELETE / HEAD / OPTIONS) | ✅ |
| Automatic API Inspector | ✅ |
| Optional Remote API Logging | ✅ |
| Connectivity Monitoring | ✅ |
| Failed API Monitoring | ✅ |
| cURL Generator | ✅ |
| Edit & Run (modify + replay requests) | ✅ |
| Export Logs (JSON / TXT) | ✅ |
| File Explorer | ✅ |
| Performance Inspector | ✅ |
| Optional Remote Performance Telemetry | ✅ |
📸 API Studio in Action #
API Inspector list · Request detail · Performance Inspector
Everything you need to debug your Flutter app #
🌐 API Client #
A built-in HTTP client, wired directly into the API Inspector — every request made through it is captured automatically.
| Capability | Supported |
|---|---|
| GET / POST / PUT / PATCH / DELETE / HEAD / OPTIONS | ✅ |
| Multipart uploads | ✅ |
| File downloads | ✅ |
| Custom headers | ✅ |
| Query parameters | ✅ |
| Authorization | ✅ |
| Request timeout | ✅ |
| Retry policy | ✅ |
| Base URL configuration | ✅ |
ApiStudio.initClient(baseUrl: 'https://api.example.com');
final response = await ApiStudioClient.instance.get('/posts');
await ApiStudioClient.instance.post(
'/login',
data: {'email': 'john@example.com', 'password': '123456'},
);
📡 API Inspector #
Every request made through ApiStudioClient is captured automatically — no extra configuration required.
- Request/response headers, body, and query parameters
- Status code and response time
- Error details and stack traces
- Search by URL/endpoint
- Filter by HTTP method and status
- JSON formatting with copy-to-clipboard
- Delete individual logs
ApiStudio.show(context);
List · Overview · Request · Response · Error
📤 Optional Remote API Logging #
Pass an API key to also forward API execution logs to the API Studio backend:
await ApiStudio.initialize(apiKey: 'YOUR_API_KEY');
- Optional — remote logging stays fully disabled without a key
- Fire-and-forget — never blocks or delays your requests
- Logging failures are swallowed silently and never throw
- Sensitive headers (
Authorization,Cookie,Set-Cookie,X-API-Key,Proxy-Authorization) are stripped before upload - Recursive-logging protection — requests to the logging backend itself are never re-logged
🌍 Connectivity Monitoring #
await ApiStudio.initialize(enableConnectivityStream: true);
final isOnline = await ApiStudio.isInternetConnected();
ApiStudio.internetConnectivityStream.listen((isOnline) {
// React to connectivity changes
});
internetConnectivityStreamrequiresenableConnectivityStream: trueduring initialization.isInternetConnected()always works as a one-off check, regardless of that flag.
📈 Failed API Monitoring #
await ApiStudio.initialize(enableFailedApiStream: true);
final failedCount = ApiStudio.failedApiCount;
ApiStudio.failedApiCountStream.listen((count) {
// Update a badge, trigger an alert, etc.
});
📝 cURL Generator #
Every captured request can be converted into a ready-to-use cURL command — useful for sharing with backend teams, QA testing, or debugging from a terminal.
� Export Logs #
Export the full request history for sharing or offline review:
- JSON
- Plain text (TXT)
⚡ Edit & Run #
Modify an intercepted request — headers, query parameters, or body — directly from the API Inspector, then run it again instantly without touching your application code.
📁 File Explorer #
A lightweight, read-only browser for application-internal files and folders — handy for QA and debugging without a native file manager.
- Browse folders and files with breadcrumb navigation
- Open files externally using the platform's default handler (file opening is delegated entirely to the OS; API Studio does not render or parse file contents)
- Download files with platform-aware behavior — system Downloads folder on Android/desktop, share sheet on iOS
- Download confirmation dialog with success/failure feedback
- Graceful fallback to download when external opening isn't available
ApiStudio.showFileExplorer(context);

⚡ Performance Inspector #
A lightweight, in-app performance monitor — no external profiler required.
- FPS — current, average, minimum, maximum
- Frame time, janky frames, jank rate
- UI thread time, raster thread time
- Memory usage and peak memory (availability depends on platform)
- App startup phase timing
- Per-screen performance tracking
- Performance timeline with event history
- Overall performance health score with a descriptive grade
- Start/stop and clear recording sessions
- Animated, real-time graphs with smooth metric transitions
ApiStudio.showPerformanceInspector(context);
// Or drive it programmatically:
ApiStudio.startPerformanceMonitoring();
ApiStudio.stopPerformanceMonitoring();

📊 Performance Monitoring (Remote Telemetry) #
Optionally upload aggregated performance snapshots to the API Studio backend, so you can track app health over time without leaving your own analytics stack out of the loop.
await ApiStudio.initialize(
apiKey: 'YOUR_API_KEY',
enablePerformanceMonitoring: true,
);
- Disabled by default (
enablePerformanceMonitoring: false) — with noapiKey/flag, zero performance network calls are ever made. - Performance metrics (FPS, frame time, jank, memory, startup, health score) are collected locally using the existing Performance Inspector engine — nothing new to configure.
- An aggregated snapshot is uploaded at most once per hour — never every few seconds, never on every snapshot.
- The one-hour interval is persisted locally and survives app restarts.
- Uses the exact same
apiKeyand backend already configured for Optional Remote API Logging — no second API key, no second base URL. - Fire-and-forget — a failed performance upload never affects, delays, or throws for your normal API requests.
Conceptually, this uploads to:
POST /api/v1/performance
📦 Installation #
dependencies:
api_studio: ^1.0.3
flutter pub get
🚀 Quick Start #
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await ApiStudio.initialize();
runApp(const MyApp());
}
Open any of the built-in screens from anywhere in your widget tree:
ApiStudio.show(context); // API Inspector
ApiStudio.showFileExplorer(context); // File Explorer
ApiStudio.showPerformanceInspector(context); // Performance Inspector
📄 License #
MIT License
Made with ❤️ for the Flutter community