bm_flutter_networking 0.2.0
bm_flutter_networking: ^0.2.0 copied to clipboard
A Flutter networking package providing a type-safe network layer with SSL pinning, token refresh, interceptors, and connectivity monitoring.
0.2.0 #
- Added an in-app network inspector: shake the device to open a bottom sheet listing every captured request, with search, a light/dark theme toggle, and a detail screen (real push/pop navigation, copy-to-clipboard) for headers and bodies. Gated by the existing
Logger.isEnabledflag. - On iOS, shake detection uses the native
motionEndedgesture (works in the Simulator's Device > Shake Gesture, not just on real devices) via a small bundled native plugin. - On other platforms, shake detection falls back to
sensors_plusaccelerometer thresholding. NetworkLogListPageandNetworkLogDetailPageare also exported standalone for apps that want to push them from their own debug menu instead of the shake gesture.
0.1.12 #
- Added full production example app: Supabase backend, BLoC + Freezed state management,
WithViewStateerror handling,auto_routenavigation, andenvied-based config with test credentials pre-filled.
0.1.11 #
- Added
errorModelAs<T>()toAPIError— typed accessor for the decoded error payload, replacing the double-cast pattern(apiError.errorModel as T?)withapiError.errorModelAs<T>().
0.1.10 #
- Fixed WASM incompatibility caused by
file_io.dartandssl_pinning_helper.dartfalling back to the native (dart:io) implementation whendart.library.htmlis absent — which is the case on both native AND WASM. Conditional exports now default to the web stub and only opt into native whendart.library.iois explicitly available.
0.1.9 #
- Fixed WASM incompatibility:
NetworkMonitornow uses conditional exports soconnectivity_plus(which usesdart:htmlinternally) is not imported on WASM targets. - On WASM,
NetworkMonitor.isConnectedreturnstrueandonConnectivityChangedreturns an empty stream; network failures surface as HTTP errors directly.
0.1.8 #
- Fixed security issue:
SSLPinningHelperno longer accepts TLS-invalid certificates for non-pinned hosts whenallowFallbackis true —allowFallbacknow only applies to pinned hosts where pinning validation fails. - Fixed file sink not being closed on error in
saveStreamToTemp(native file download). - Fixed
UnsupportedErrorfrom web file I/O being swallowed and misreported asinvalidURLon theModelTargetTypepath. - Documented that
DownloadedFile.response.streamis already consumed afterperformDownloadcompletes.
0.1.7 #
- Added dartdoc comments to public API elements to exceed 20% documentation threshold.
- Removed redundant
bm_cookie.dartimport inperform_async.dart(already re-exported vianetwork_response.dart).
0.1.6 #
- Added unit tests for
BMCookieand web platform stubs. - Updated README with platform support table,
BMCookiedocs, and web caveats.
0.1.5 #
- Added web platform support via conditional imports.
- Replaced
dart:ioCookie with platform-agnosticBMCookieclass. - File I/O (upload/download) isolated behind conditional exports; throws
UnsupportedErroron web. SSLPinningHelperisolated behind conditional exports; throwsUnsupportedErroron web (browsers handle TLS natively).
0.1.4 #
- Re-publish to resolve version conflict on pub.dev.
0.1.3 #
- Declared explicit platform support: Android, iOS, macOS, Windows, Linux.
0.1.2 #
- Fixed homepage URL in pubspec.yaml.
- Added example app demonstrating
Target,ModelTargetType, andperformAsync.
0.1.1 #
- Bumped
connectivity_plusconstraint to^7.1.1.
0.1.0 #
- Initial release.
- Type-safe network layer with
Target,ModelTargetType, andSuccessTargetType. - Automatic token refresh via
TokenRefreshHandler. - Custom error mapping via
APIErrorResponseMapper. - SSL certificate pinning.
- Built-in logging and connectivity monitoring.
- File upload and download support.
Result<T, E>type for explicit error handling.