A Dart/Flutter package to perform network calls. It uses Isolates to perform network calls on Dart VM environments and WebWorkers on Web.

Overview

ArDriveHTTP

ArDriveHTTP is a package to perform network calls for ArDrive Web. It uses Isolates to perform network calls on Dart VM environments and WebWorkers on Web.

Features

  • Standarized network calls
  • Support retries
  • Use Isolates and WebWorkers to reduce impact on UI process

Implemented methods

  • get()
  • getJson()
  • getAsBytes()

Getting started

In order to use this package you need to copy ardrive-http.js and workers.js to web folder so they can be dynamic imported when some ArDriveHTTP method is called.

Usage

Simply create a new instance of ArDriveHTTP and pass the follow optional params:

  • retries: amount of retry attempts
  • retryDelayMs: base retry delay in ms
  • noLogs: to hide logs
// Using defaults
final http = ArDriveHTTP()

// Setting params
// Retry 4 times
// Initial delay of 100ms
// Don't log requests
final http = ArDriveHTTP(
  retries: 4,
  retryDelayMs: 100,
  noLog: true,
);

Call the intended method like:

// Get raw response
final response = await ArDriveHTTP().get(url: 'https://url');

// Get JSON response
final jsonResponse = await ArDriveHTTP().get(
  url: 'https://url',
  isJson: true,
);
// OR
final getJsonResponse = await ArDriveHTTP().getJson('https://url');

// Get bytes
final bytesResponse = await ArDriveHTTP().get(
  url: 'https://url',
  asBytes: true,
);
// OR
final getBytesResponse = await ArDriveHTTP().getAsBytes('https://url');
You might also like...

A flutter package uses native implementations to resize an image

fast_image_resizer This package uses native implementations to resize an image.

Dec 20, 2021

This package is uses to make a fade animation to your widget easily

This package is uses to make a fade animation to your widget easily. Usage : To use this plugin, add fading_widget_package as a dependency in your pub

Jun 5, 2022

A zero-dependency web framework for writing web apps in plain Dart.

Rad Rad is a frontend framework for creating fast and interactive web apps using Dart. It's inspired from Flutter and shares same programming paradigm

Dec 13, 2022

flutter web app with given code and example. Step by step teaching how to build a flutter web app with backend

flutter_web A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if t

Oct 26, 2022

Trying out Flutter for desktop Web app development as an alternative to SPA frameworks (such as React and Angular) by recreating one of the pages of an existing CV Management web app

HTML Renderer Demo CanvasKit Renderer Demo Reddit discussion This repo contains a PoC of using Flutter as a traditional SPA framework for creating a d

Oct 11, 2022

An isolated worker for Flutter (Isolate) and Web (Web Worker). Behaves almost the same as the compute function, except it is not a one-off worker.

A singleton isolated worker for all platforms. On most platforms, it uses Flutter's Isolate, except on the web, since Isolate is not available, it use

Nov 11, 2022

WooCommerce App template that uses Flutter. Integrated to work with WooCommerce stores, connect and create an IOS and Android app from Flutter for IOS and Android

WooCommerce App template that uses Flutter. Integrated to work with WooCommerce stores, connect and create an IOS and Android app from Flutter for IOS and Android

WooCommerce App: Label StoreMax Label StoreMax - v5.3.1 Official WooSignal WooCommerce App About Label StoreMax Label StoreMax is an App Template for

Jan 9, 2023

Flutterbodydetection - A flutter plugin that uses MLKit on iOS/Android platforms to enable body pose and mask detection using Pose Detection and Selfie Segmentation APIs for both static images and live camera stream.

Flutterbodydetection - A flutter plugin that uses MLKit on iOS/Android platforms to enable body pose and mask detection using Pose Detection and Selfie Segmentation APIs for both static images and live camera stream.

body_detection A flutter plugin that uses MLKit on iOS/Android platforms to enable body pose and mask detection using Pose Detection and Selfie Segmen

Dec 5, 2022
Releases(v1.1.1)
Owner
AR.IO
All source code for ar.io; the global network, protocol, and currency that enables the permaweb.
AR.IO
Dart package that conveniently wraps an isolate, ports and state for easy isolates.

Isolate Agents Description Isolate Agents adds a new class, Agent, which is a proper implementation of the Actor model for Dart. Where Isolates have n

null 65 Jan 2, 2023
Dart / Flutter package that allows discovering network devices in local network (LAN).

lan_scanner Dart / Flutter package that allows discovering network devices in local network (LAN). Note: This library is intended to be used on Class

null 12 Dec 9, 2022
Flutter plugin that leverages Storage Access Framework (SAF) API to get access and perform the operations on files and folders.

Flutter plugin that leverages Storage Access Framework (SAF) API to get access and perform the operations on files and folders.

Vehement 8 Nov 26, 2022
The Simplest way to Authenticate and make Rest API calls in .Net

Simple Auth Every API needs authentication, yet no developer wants to deal with authentication. Simple Auth embeds authentication into the API so you

James Clancey 166 Dec 22, 2022
Call Kit is a prebuilt feature-rich call component, which enables you to build one-on-one and group voice/video calls into your app with only a few lines of code.

Call Kit (ZegoUIKitPrebuiltCall) Call Kit is a prebuilt feature-rich call component, which enables you to build one-on-one and group voice/video calls

ZEGOCLOUD 9 Dec 26, 2022
CurrencyConverter - Flutter based application that uses web-scrapping to show currency of selected countries.

CurrencyConverter - Flutter based application that uses web-scrapping to show currency of selected countries.

Dhruv Dholakia 1 Jul 7, 2022
GitHub Action that uses the Dart Package Analyzer to compute the Pub score of Dart/Flutter packages

Dart/Flutter package analyzer This action uses the pana (Package ANAlysis) package to compute the score that your Dart or Flutter package will have on

Axel Ogereau-Peltier 45 Dec 29, 2022
Dart package for Async Data Loading and Caching. Combine local (DB, cache) and network data simply and safely.

Stock is a dart package for loading data from both remote and local sources. It is inspired by the Store Kotlin library.

xmartlabs 59 Dec 24, 2022
A simple and customizable flutter package for inputting phone number in intl / international format uses Google's libphonenumber

Intl Phone Number Input A simple and customizable flutter package for inputting phone number in intl / international format uses Google's libphonenumb

Ogunye Nathaniel Oluwatobiloba 138 Dec 11, 2022
null 1 Jan 29, 2022