boltcart_sdk 0.1.0 copy "boltcart_sdk: ^0.1.0" to clipboard
boltcart_sdk: ^0.1.0 copied to clipboard

Type-safe Dart and Flutter SDK for the Boltcart backend.

example/boltcart_sdk_example.dart

import 'package:boltcart_sdk/boltcart_sdk.dart';

Future<void> main() async {
  final sdk = BoltcartSdk(
    baseUrl: Uri.parse('https://api.example.com'),
    auth: BoltcartAuth.bearer('replace-with-access-token'),
  );

  final health = await sdk.system.getHealth();

  switch (health) {
    case ApiSuccess(:final data):
      print('API is ${data.status}; uptime=${data.uptime}');
    case ApiFailure(:final error):
      print('API request failed: ${error.message}');
  }
}
1
likes
110
points
78
downloads

Documentation

API reference

Publisher

verified publisherabdelrahman.co

Weekly Downloads

Type-safe Dart and Flutter SDK for the Boltcart backend.

License

unknown (license)

Dependencies

collection, dio, meta

More

Packages that depend on boltcart_sdk