no_code_api_connector 0.0.1 copy "no_code_api_connector: ^0.0.1" to clipboard
no_code_api_connector: ^0.0.1 copied to clipboard

A Flutter package to make api requests with out writing the code.

๐Ÿ“ฆ no_code_api_connector #

Pub Version License Issues Stars

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: ^0.0.1

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 a JSON config #

final config = {
  "baseUrl": "https://jsonplaceholder.typicode.com",
  "headers": {
    "Content-Type": "application/json"
  },
  "endpoints": {
    "getPosts": {
      "path": "/posts",
      "method": "GET"
    },
    "createPost": {
      "path": "/posts",
      "method": "POST",
      "body": {
        "title": "{{title}}",
        "body": "{{body}}",
        "userId": "{{userId}}"
      }
    }
  }
};

Step 3: Initialize the connector #

final connector = NoCodeApiConnector.fromJson(config);

Step 4: Call an endpoint #

// GET example
final response = await connector.call("getPosts");

if (response.statusCode == 200) {
  print(response.body);
} else {
  print('Error: ${response.statusCode}');
}

// POST example
final postResponse = await connector.call("createPost", variables: {
  "title": "New Post",
  "body": "This is the body of the new post.",
  "userId": 1
});

You can find more advanced examples in the /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]

15
likes
0
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package to make api requests with out writing the code.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http

More

Packages that depend on no_code_api_connector