igot_http_service_helper 0.3.0 copy "igot_http_service_helper: ^0.3.0" to clipboard
igot_http_service_helper: ^0.3.0 copied to clipboard

This package contains a set of high-level functions and classes that make it easy to consume HTTP resources. It's multi-platform (mobile, desktop, and browser) and supports multiple implementations wi [...]

Features #

TODO: This package contains a set of high-level functions and classes that make it easy to consume HTTP resources. It's multi-platform (mobile, desktop, and browser) and supports multiple implementations with DATA Base support with respect to given TTL.

1.TTL Handling:

  • When TTL is Null: The system will call the API directly and return the response.

  • When TTL is Not Null: The system will check the database for existing data.

  • If Data Exists: It will calculate the duration since the data was last updated.

  • If the Duration is Within the TTL: The system will return the data from the database.

  • If the Duration Exceeds the TTL: The system will call the API, update the data in the database, and return the API response.

  • If Data Does Not Exist: The system will call the API, store the data in the database, and return the API response.

2.Force Update Handling:

  • If the forceUpdate flag is set to true, the system will: Call the API to retrieve the latest data. Update the data and TTL in the database. Return the updated data.

Getting started #

Using

import 'package:igot_http_service_helper/services/http_service.dart';

var response = await HttpService.get( ttl: Duration(hours: hour), apiUri: Uri.parse('example.com'); );

Usage #

TODO: Used By Igot Project for HTTP calls

Configuration Details #

Flutter 3.32.8 • channel stable • https://github.com/flutter/flutter.git Framework • revision edada7c56e (4 months ago) • 2025-07-25 14:08:03 +0000 Engine • revision ef0cd00091 (4 months ago) • 2025-07-24 12:23:50 -0700 Tools • Dart 3.8.1 • DevTools 2.45.1

0
likes
0
points
267
downloads

Publisher

unverified uploader

Weekly Downloads

This package contains a set of high-level functions and classes that make it easy to consume HTTP resources. It's multi-platform (mobile, desktop, and browser) and supports multiple implementations with DATA Base support with respect to given TTL.

Homepage

License

unknown (license)

Dependencies

crypto, flutter, hive, hive_flutter, http, path

More

Packages that depend on igot_http_service_helper