apinion 0.0.3 copy "apinion: ^0.0.3" to clipboard
apinion: ^0.0.3 copied to clipboard

Simplify API calls in Dart & Flutter with Apinion — clean syntax, built-in logging, and easy setup.

apinion_logo

Apinion is a lightweight, developer-friendly Dart package that simplifies REST API calls in your Flutter or Dart apps.

  • 🔐 Optional API key support
  • 🌐 Base URL set once
  • ⏱ Customizable timeout duration
  • 🪄 One-liner HTTP calls: GET, POST, PUT, PATCH, DELETE
  • 🖼️ File/image upload support
  • 🪵 Built-in pretty logger using logger package

Documentation Button


🔍 Example #

import 'package:apinion/apinion.dart';

void main() async {
  ApinionConfig.init(
    baseUrl: 'https://jsonplaceholder.typicode.com',
  );

  // GET request
  final getResponse = await ApinionClient.get('/posts/1');
  if (getResponse.isSuccess) {
    print('Title: ${getResponse.responseData['title']}');
  } else {
    print('Error: ${getResponse.errorMessage}');
  }

  // POST request
  final postResponse = await ApinionClient.post('/posts', body: {
    'title': 'foo',
    'body': 'bar',
    'userId': 1,
  });
  if (postResponse.isSuccess) {
    print('New Post ID: ${postResponse.responseData['id']}');
  }
}
5
likes
150
points
52
downloads
screenshot

Publisher

verified publisherratulicious.me

Weekly Downloads

Simplify API calls in Dart & Flutter with Apinion — clean syntax, built-in logging, and easy setup.

Homepage
Repository (GitHub)
View/report issues

Topics

#api #http #logging #network

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter, http, logger

More

Packages that depend on apinion