remote_request 0.0.2+8 copy "remote_request: ^0.0.2+8" to clipboard
remote_request: ^0.0.2+8 copied to clipboard

A flutter package to request remote network calls i.e, Create , Read , Update , Delete, Patch, Put

A flutter package for remote network request

Features #

Remote Network Request will response from API with any operation i,e CRUD 1.Create, 2.Read, 3.Update, 4.Delete, 5.Put, 6.Patch

In future about to add few more operations that will allow calling the APIs also the fromMap or toMap conversion in it.

Getting started #

Just need to call Request Class to having CRUD operation

Usage #

Request Class all all the features required, But ** Do not forget to initialize the BaseURL and Auth token the interceptors

You can through exceptions also

var response = await Request.get(
          "ENDPOINT/get/");
try{
if (response != null && response.statusCode == 200) {
        if (jsonData["status"] == 200) {
          for (var temp in jsonData["data"]) {
            log("Case : $temp");
            cases.add(CaseModel.fromMap(temp));
          }
        } else {
          throw await Request.throwExceptionFromStatusCode(jsonData["status"]);
        }
      }
} on DioException catch (e) {
      log(e.toString());
      throw await Request.throwException(e);
    }

Additional information #

This package under the hood uses Dio and Dio interceptor to call APIs

9
likes
145
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter package to request remote network calls i.e, Create , Read , Update , Delete, Patch, Put

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

BSD-3-Clause (license)

Dependencies

dio, dio_cache_interceptor, flutter

More

Packages that depend on remote_request