clean_api 0.0.7 copy "clean_api: ^0.0.7" to clipboard
clean_api: ^0.0.7 copied to clipboard

outdated

Cleanest way to implement Rest Api with caching using functional programming aproach.

Getting started #

First setup your base url

void main() {
  CleanApi.instance().setBaseUrl('https://baseurl.com/');
  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);
13
likes
0
pub points
49%
popularity

Publisher

verified publishersquadhead.com

Cleanest way to implement Rest Api with caching using functional programming aproach.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

equatable, flutter, flutter_easylogger, fpdart, hive, hive_flutter, http

More

Packages that depend on clean_api