clean_api

Creator: coderz1093

Last updated:

0 purchases

clean_api Image
clean_api Images

Languages

Categories

Add to Cart

Description:

clean api

Getting started #
First setup your base url
void main() {
cleanApi.instance().setup(baseUrl: 'https://catfact.ninja/', showLogs: true);
runApp(const MyApp());
}
copied to clipboard
Fetch your data #
final Either<ApiFailure, CatModel> response = await cleanApi.get(
fromJson: (json) => CatModel.fromJson(json), endPoint: 'fact');
changeState = response.fold((l) => l.toString(), (r) => r.fact);
copied to clipboard

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.