offline_store_upload 0.0.1 copy "offline_store_upload: ^0.0.1" to clipboard
offline_store_upload: ^0.0.1 copied to clipboard

To be able to store api calls locally and upload when needed.

offline_store_upload: Stores api calls locally and uploads when needed. This package can be used in apps where offline functionality is needed.

Usage #

TODO: Add longer examples to /example folder.


import 'package:offline_store_upload/offline_store_upload.dart';

/// initialize a list
 List<OfflineStoreUploadModel> data = [];


/// add api calls to the list
  data.add(
    OfflineStoreUploadModel(
    body: {
      "name": "Flutter",
      "age": 30,
    },
    api_url: url,
    api_type: APITYPE.POST,
    ),
   );

/// add api calls to the list

 data.add(
    OfflineStoreUploadModel(
    body: {
      "name": "Dart",
      "age": 20,
    },
    api_url: url,
    api_type: APITYPE.POST,
    ),
   );

/// upload when needed
OfflineStoreUpload().addData(data: data);

1
likes
120
pub points
0%
popularity

Publisher

unverified uploader

To be able to store api calls locally and upload when needed.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dio, flutter, flutter_lints, path_provider, pretty_dio_logger

More

Packages that depend on offline_store_upload