offline_store_upload 0.0.1 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);