๐Ÿ“ฆ no_code_api_connector

Pub Version Issues

no_code_api_connector is a Flutter package that allows you to connect to REST APIs using a simple JSON-based configuration โ€” no backend or manual HTTP logic needed. Perfect for developers who want to set up dynamic API integrations quickly and efficiently with minimal boilerplate.

๐Ÿš€ Features

  • ๐ŸŒ Easily connect to any REST API with a JSON config
  • ๐Ÿงฉ Supports GET, POST, PUT, DELETE, and more
  • ๐Ÿ” Built-in support for Bearer and Basic authentication
  • ๐Ÿ”„ Handles headers, query params, and body formats
  • ๐Ÿงช Developer-friendly and easy to debug
  • ๐Ÿงฐ Extensible and ready for production

๐Ÿ›  Getting Started

Prerequisites

  • โœ… Flutter SDK โ‰ฅ 3.0.0
  • โœ… Dart โ‰ฅ 2.18.0
  • โœ… Internet permission (required for Android/iOS)

Installation

Add the following to your pubspec.yaml:

dependencies:
  no_code_api_connector: 

Then run:

flutter pub get

๐Ÿ“ˆ Usage

Step 1: Import the package

import 'package:no_code_api_connector/no_code_api_connector.dart';

Step 2: Create instance of ApiConfig and set parameters tha you want to include in all api requests

final apiConfig = ApiConfig(baseUrl: 'https://api.escuelajs.co/api/v1');

Step 3: Create Instance of ApiConnector by passing instance of ApiConfig

final connector = ApiConnector(apiConfig);

Step 4: Create instance of RequestConfig and set necessary parameters like method and endpoint(path)

//Get Method
final requestConfig = RequestConfig(
  method: HttpMethod.get,
  path: '/products/16',
);

Step 4: Call an endpoint

Map<String, dynamic> fetchedData = await connector.sendRequest(requestConfig);

You can find more advanced examples in the lib/example directory.


๐Ÿ“ Folder Structure

lib/
โ”œโ”€โ”€ no_code_api_connector.dart
src/
โ”œโ”€โ”€ api_connector.dart
โ”œโ”€โ”€ api_config.dart
โ”œโ”€โ”€ auth_provider.dart
โ”œโ”€โ”€ request_config.dart
โ”œโ”€โ”€ response_handler.dart
example/
โ”œโ”€โ”€ main.dart

๐Ÿ“„ License

This project is licensed under the MIT License.


๐Ÿ™Œ Contributions

Contributions, suggestions, and feedback are always welcome!

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. Push to the branch (git push origin feature/your-feature)
  5. Open a Pull Request

๐Ÿ“ฌ Contact

For issues, reach out via the GitHub Issues page.


Made with โค๏ธ by [Dhruv Chotai]