MisarMisar Docs
MisarMailMisarBlogMisarReachMisarPostMisarDevMisarCoderMisarSEOMisar PlatformMisar SSO
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.0

Then 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

ParameterDefaultDescription
apiKeyRequired. Your API key (mdk_...).
baseUrlhttps://api.misar.io/devBase API URL.
maxRetries3Retry attempts for retryable status codes (429, 500, 502, 503, 504) with exponential backoff.
httpClientnullOptional package:http Client for injection/reuse.

Resources

This early v1.0.0 port implements the following methods:

MethodHTTPDescription
projectsList()GET /projectsList projects.
projectsCreate(Map)POST /projectsCreate a project.
templatesList()GET /templatesList templates.
apiKeysList()GET /api-keysList API keys.
chatComplete(Map)POST /chatSend a chat completion request.
usageGet()GET /usageRetrieve 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.