flutter_http_caching

Last updated:

0 purchases

flutter_http_caching Image
flutter_http_caching Images
Add to Cart

Description:

flutter http caching

Flutter Http Caching #
Widgets that make it easy to integrate API caching into Flutter. Built to
work with package:http and
uses package:sqflite.This package contains a set of functions
that make it easy to consume HTTP resources.
Platform Support #



Android
iOS
MacOS
Web
Linux
Windows




✔️
✔️
✔️






Getting Started #
In your flutter project add the dependency in your pubspec.yaml file:
dependencies:
...
 flutter_http_caching:
copied to clipboard
Getting Started #
This package contains three functions which returns http response.

httpGet : it stores request and response from get method.
httpPut: it stores request and response from Put method.
httpPost: it stores request and response from post method .
httpPatch: it stores request and response from patch method.
httpDelete: it stores request and response from delete method.

Each of these take instance of HTTP Client and Url as required field and also has header and
body as optional fields.We have created a custom interceptor for logging request which user can
use by passing isLogging true and user can also pass custom interceptor in interceptors which
accept list of interceptors.
Usage #
Import flutter_http_caching.dart
import 'package:flutter_http_caching/flutter_http_caching.dart';
copied to clipboard
Create Http Client variable

var client = http.Client();
copied to clipboard
get the http response using http_caching functions

var response = httpGet(client, url: baseUrl);
copied to clipboard
add custom interceptor

var response = httpGet(client, url: baseUrl,interceptors: [customInterceptor()]);
copied to clipboard
Thank You #
We greatly appreciate any contributions to the project which can be as simple as providing feedback
on the API or documentation.
You can also click on the "Thumb up" button of the top of the pub.dev page if you find this Package helpfull. #
Team CREO IT #

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.