network_caller 0.0.1
network_caller: ^0.0.1 copied to clipboard
A lightweight and easy-to-use Dart/Flutter package to simplify making network API calls. It supports all CRUD operations (Create, Read, Update, Delete) with customizable headers, request bodies, and t [...]
network_caller #
A reusable and clean Flutter package to perform HTTP requests (GET, POST, PUT, DELETE, PATCH) with optional token and custom headers.
Features #
✅ Supports all HTTP methods
✅ Custom headers and bearer token
✅ Clean error handling and response class
✅ Optional JSON encoding
Usage #
import 'package:network_caller/network_caller.dart';
final response = await NetworkCaller.request(
url: 'https://api.example.com/data',
method: ApiMethod.post,
body: {'name': 'John'},
token: 'your_token_here',
);
if (response.isSuccess) {
print(response.data);
} else {
print(response.message);
}