smart_api 1.1.1
smart_api: ^1.1.1 copied to clipboard
Dynamic Dio wrapper for Flutter — auto raw/multipart detection, global loader/snackbar/toast hooks, session-expiry handling, and no-internet retry, no try/catch boilerplate.
Changelog #
1.1.1 #
- Added
SmartApiSocket: a connectivity-aware Socket.IO wrapper (socket_io_client+connectivity_plus) with the same hook-driven philosophy asSmartApiClient— globalSmartApiSocketHooksfor connect/disconnect/handshake events, auto-reconnect on network changes, and no per-project socket boilerplate. - Added
forceRawtoSmartApiClient.post/putso a body can be sent exactly as given (string/XML/pre-encoded payload), skipping the JSON-map/multipart handling entirely.
1.0.5 #
- Added
SmartApiToast: a built-in, config-driven toast/snackbar widget (success, error, warning, info, glass, gradient, timer, map, welcome, human-runner and typewriter styles) soSmartApiHooks.showMessageno longer needs a third-party toast package. - Moved the runnable demo out of
lib/and intoexample/lib/main.dartso the package ships a proper pub.flutter-io.cn example. - Removed generated Flutter asset bindings (
lib/generated/) that were never part of the public API and were dragging down documentation coverage. - Added dartdoc comments across the public API (
SmartApiClient,SmartApiConfig,SmartApiHooks,SmartApiRequest,SmartApiFile,SmartApiResponse,SmartApiEnvelope,SmartApiKeyMap). - Added a
smart_api.dartbarrel file so the whole package can be imported with a singleimport 'package:smart_api/smart_api.dart';.
1.0.1 #
- Fixed
pubspec.yaml: shorteneddescriptionto fit pub.flutter-io.cn's 60–180character limit and addedhomepage/repository/issue_trackerfields.
1.0.0 #
- Initial release.
- Auto multipart/raw detection for request bodies.
- Explicit
SmartApiFilesupport for single/multiple file uploads with custom form-field keys. - Fully configurable response parsing via
SmartApiKeyMapor a customresponseParser. - Global UI hooks (
SmartApiHooks) for loaders, snackbars, session expiry, and no-internet retry. - Query params supported on every HTTP method, not just GET.