SDKs
Flutter SDK
Official Misar.Dev Flutter SDK — build, deploy, and manage apps from Flutter via api.misar.io/dev.
The official Misar.Dev Flutter SDK (misar_dev_flutter). Async, with built-in retries and typed errors.
Installation
Add to pubspec.yaml:
dependencies:
misar_dev_flutter: ^1.0.0Then run flutter pub get.
Quick start
Construct a MisarDevClient with your API key (format mdk_...) and point it at the Misar.Dev API:
import 'package:misar_dev_flutter/misar_dev.dart';
final client = MisarDevClient(
apiKey: 'mdk_your_api_key',
baseUrl: 'https://api.misar.io/dev',
);
// List your projects
final projects = await client.projectsList();
print(projects);Configuration
| Parameter | Default | Description |
|---|---|---|
apiKey | — | Required. Your API key (mdk_...). |
baseUrl | https://api.misar.io/dev | Base API URL. |
maxRetries | 3 | Retry attempts for retryable status codes (429, 500, 502, 503, 504) with exponential backoff. |
httpClient | null | Optional package:http Client for injection/reuse. |
Resources
This early v1.0.0 port implements the following methods:
| Method | HTTP | Description |
|---|---|---|
projectsList() | GET /projects | List projects. |
projectsCreate(Map) | POST /projects | Create a project. |
templatesList() | GET /templates | List templates. |
apiKeysList() | GET /api-keys | List API keys. |
chatComplete(Map) | POST /chat | Send a chat completion request. |
usageGet() | GET /usage | Retrieve usage data. |
// Create a project
final project = await client.projectsCreate({
'name': 'my-app',
'template': 'nextjs',
});
// Chat completion
final reply = await client.chatComplete({
"messages": [
{"role": "user", "content": "Hello"}
],
});This is an early v1.0.0 release and exposes a subset of the full API surface. Other resources available in the TypeScript SDK are not yet ported.
Error handling
Non-success responses throw MisarDevApiError; transport failures throw MisarDevNetworkError.
try {
final projects = await client.projectsList();
} on MisarDevNetworkError catch (e) {
print('Network error: ' + e.message);
} on MisarDevApiError catch (e) {
print('API error ' + e.status.toString() + ': ' + e.message);
}Retryable status codes (429, 500, 502, 503, 504) are retried automatically up to maxRetries.