api_placeholder

Last updated:

0 purchases

api_placeholder Image
api_placeholder Images
Add to Cart

Description:

api placeholder

API Placeholder #

A composable, light-weight package that can be used as a placeholder whenever you need some fake data.
With this package, you can get some famous API Responses like, users, posts, comment, photos, todos, etc.
It can be used for prototyping and testing, before using real Real API Endpoints.
Usage #
To use this plugin, add api_placeholder as a dependency in your pubspec.yaml
void getFakeUsers() async {
String x = await ApiPlaceholder().getUsers()
// Return a list of users
print(x);
}

void getFakePhotos() async {
String x = await ApiPlaceholder().getPhotos(id: 4);
// When Id is passed, it returns only one photo with that particular Id
print(x);
}

void getFakeTodos() async {
String x = await ApiPlaceholder().getTodos(limit: 5);
// When limit is passed, it limits the number od todos.
print(x);
}
copied to clipboard
Additional information #
Everyone is welcome to contrbute, or file any issue on this package.
Github Repo: https://github.com/ViAsmit/api_placeholder_package

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.