simple_api_client

A minimal, isolated Dart/Flutter package for making JSON API calls that works on mobile, desktop, CLI, and web.

Features

  • Pure Dart logic – no Flutter BuildContext or platform channels.
  • Uses the battle‑tested http package.
  • Web‑friendly – no dart:io.

Usage

import 'package:simple_api_client/simple_api_client.dart';

void main() async {
  final api = ApiService(baseUrl: 'https://jsonplaceholder.typicode.com');
  final todo = await api.get('/todos/1');
  print(todo);
}

Example

See the example/ directory for a full runnable snippet.

Libraries

simple_api_client