api_ease 1.0.0
api_ease: ^1.0.0 copied to clipboard
Eliminate API call boilerplate in Flutter. Auto internet check, loading states, response validation, retry, debounce — in one line. Works with any HTTP client.
1.0.0 #
Initial release.
Added #
ApiEase.call(): callback-based API withonSuccess,onError,onLoadingChangedandonNoInternet.ApiEase.run(): returns a sealedApiResult(ApiSuccess,ApiError,ApiNoInternet) withwhenandmaybeWhen.ApiCallwidget andApiCallController: declarative loading, success, empty, error and offline states.- Internet check that verifies the network interface and probes real endpoints.
- Customizable no-internet dialog with a polished Material 3 default and retry support.
- Global and per-call response validation and error message extraction.
- Retry with fixed, linear or exponential backoff and a
retryWhenrule. - In-flight request de-duplication through
debounceKey. - Automatic
context.mountedguard for all callbacks. - Optional loading overlay.
BuildContext.hasInternetextension.- Works with any HTTP client (Dio,
http, Retrofit, Chopper, ...).
Platforms #
- Android, iOS, macOS, Windows and Linux. Web is not supported...