๐ฆ no_code_api_connector
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!
- Fork the repository
- Create your feature branch (
git checkout -b feature/your-feature
) - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature/your-feature
) - Open a Pull Request
๐ฌ Contact
For issues, reach out via the GitHub Issues page.
Made with โค๏ธ by [Dhruv Chotai]