Skip to content

rikousik/clean_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting started

First setup your base url

void main() {
  cleanApi.instance().setup(baseUrl: 'https://catfact.ninja/', showLogs: true);
  runApp(const MyApp());
}

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published