FLUTTER ECOSYSTEM

ratulhasanruhan/apinion

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

apinion project cover
Stars
0
Forks
0
Last push (UTC)
May 17, 2025
Project status
Active
Ratul Hasan Ruhan  GitHub avatar
GITHUB User

Ratul Hasan Ruhan ↗

Building Meaningful Tech | Software Engineer Specializing in Mobile, AI, and Localized Solutions

AppibriumDhaka, BangladeshOfficial website ↗
LanguagesDart

Technical topics

Packages published by this repository

Dependencies used

Dependency list 6 items
  • flutter{"sdk":"flutter"}
  • http^1.4.0
  • logger^2.5.0
  • flutter_testDevelopment{"sdk":"flutter"}
  • flutter_lintsDevelopment^4.0.0
  • testDevelopment^1.24.0

Original README

English project snapshot. Visit GitHub for the latest content.

Expand / collapse project README

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']}');
  }
}