SDKs

Dart / Flutter SDK

Official Dart client for the MUDBASE API, published on pub.dev as mudbase_sdk.

Installation

bash
dart pub add mudbase_sdk
dart pub add mudbase_sdk

Quick Start

Construct a MudbaseSdk instance and pull the API classes you need off it — there is no unified client wrapper, each resource is its own *Api instance. Request models use the generated built_value builder pattern:

dart
import 'package:mudbase_sdk/api.dart';

final api = MudbaseSdk(basePathOverride: 'https://cloud.mudbase.dev');
api.setApiKey('ApiKeyAuth', apiKey);

final auth = api.getAuthenticationApi();
final data = api.getDataApi();

// Log in an end-user of your project
final loginResponse = await auth.loginUser(
  loginRequest: LoginRequest((b) => b
    ..email = 'morgan.chen@northwind.dev'
    ..password = 'hunter2'),
);
final session = loginResponse.data;

// List documents in a collection
final itemsResponse = await data.listData(
  projectId: projectId,
  collectionId: collectionId,
);
final items = itemsResponse.data;
import 'package:mudbase_sdk/api.dart';

final api = MudbaseSdk(basePathOverride: 'https://cloud.mudbase.dev');
api.setApiKey('ApiKeyAuth', apiKey);

final auth = api.getAuthenticationApi();
final data = api.getDataApi();

// Log in an end-user of your project
final loginResponse = await auth.loginUser(
  loginRequest: LoginRequest((b) => b
    ..email = 'morgan.chen@northwind.dev'
    ..password = 'hunter2'),
);
final session = loginResponse.data;

// List documents in a collection
final itemsResponse = await data.listData(
  projectId: projectId,
  collectionId: collectionId,
);
final items = itemsResponse.data;

More

For error handling, pagination, and other languages, see the SDKs Overview.