client_network_manager 1.0.7  client_network_manager: ^1.0.7 copied to clipboard
client_network_manager: ^1.0.7 copied to clipboard
A comprehensive Flutter network manager package with authentication, interceptors, and error handling support.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.7 - 2025-08-05 #
Changed #
- 
Dependency Updates: Updated package dependencies for better compatibility and latest features - Updated flutter_shared_utilitiesto^1.0.14for enhanced utility functions
- Updated flutter_connectivity_managerto^1.0.4for improved connectivity management
- Updated app_logger_managerto^2.0.0for major logging improvements
- Updated custom_lintto^0.8.0for better code analysis
- Updated flutter_custom_lintsto^1.0.19for enhanced linting rules
 
- Updated 
- 
Connectivity Interceptor Logging Enhancement: Improved logging structure - Simplified logging format from structured context objects to inline string formatting
- Enhanced readability of connectivity logs with direct value interpolation
- Maintained all connectivity state information in log messages
- Improved performance by reducing object allocation in logging calls
 
Technical #
- Logging Performance: Optimized logging calls in ConnectivityInterceptorfor better performance
- Code Consistency: Unified logging format across connectivity checking operations
- Dependency Management: Updated to latest stable versions of all dependencies
1.0.6 2025-06-2 #
Added #
- Enhanced Code Quality Standards: Updated analysis options with comprehensive linting rules
- Integrated flutter_custom_lintspackage for advanced Flutter-specific linting
- Added public_member_api_docsrule to enforce proper API documentation
- Improved code consistency and maintainability standards
 
- Integrated 
Changed #
- Network Configuration Architecture: Enhanced NetworkConfigclass- Added assertion for timeout validation to ensure positive timeout values
- Improved parameter validation and error handling
- Better default configuration management
 
- Connectivity Management Enhancement: Improved ConnectivityCheckConfigclass- Enhanced configuration options for connectivity checking
- Better timeout and retry mechanism configuration
- Improved logging and debugging capabilities
 
- Model Architecture Updates: Enhanced ListResponseModelimplementation- Improved generic type handling for better type safety
- Enhanced JSON parsing with proper null safety
- Better integration with BaseDataModelpattern
 
- Network Manager Implementation: Updated DefaultBaseNetworkManager- Enhanced dependency injection with improved logger integration
- Better error handling and response processing
- Improved connectivity manager integration
 
- Dependency Updates: Updated package dependencies
- Updated flutter_connectivity_managerto^1.0.3
- Updated app_logger_managerto^1.0.1
- Updated flutter_shared_utilitiesto^1.0.4
- Added flutter_custom_lints^1.0.3for enhanced code quality
 
- Updated 
Technical #
- Connectivity Interceptor: Enhanced retry logic with exponential backoff
- Code Quality: Comprehensive linting rules for better code consistency
- Type Safety: Improved generic type handling throughout the codebase
- Error Handling: Enhanced error recovery mechanisms
- Architecture: Better separation of concerns and dependency management
1.0.5 - 2024-06-22 #
Added #
- Enhanced Connectivity Management: Comprehensive connectivity checking with new ConnectivityCheckConfig- Multi-level connectivity validation (basic network, internet access, connection speed)
- Retry mechanisms with exponential backoff for failed connectivity checks
- Configurable test URLs for internet access verification
- Optional connection speed assessment with minimum speed requirements
- Advanced logging options for connectivity debugging
 
- Dedicated Logger Integration: Added app_logger_managerpackage for centralized logging- Consistent logging interface across all interceptors and network operations
- Enhanced debugging capabilities with structured logging
- Improved error tracking and monitoring
 
- Improved Connectivity Interceptor Architecture: Restructured connectivity handling
- Moved connectivity interceptor to dedicated /connectivity/directory
- Introduced ConnectivityCheckConfigfor fine-grained connectivity control
- Enhanced retry logic with configurable delays and attempts
- Better error handling and reporting for network connectivity issues
 
- Moved connectivity interceptor to dedicated 
Changed #
- Dependency Updates: Updated core dependencies for better compatibility
- Added flutter_connectivity_manager: ^1.0.1for enhanced connectivity management
- Added app_logger_manager: ^1.0.0for unified logging interface
- Updated flutter_shared_utilitiesto^1.0.4for latest utility functions
- Updated collectionto^1.19.1for improved performance
 
- Added 
- Authentication Interceptor Enhancements: Improved AuthInterceptorwith better error handling- Enhanced retry logic for network timeout scenarios
- Improved token refresh mechanisms with better error recovery
- Added support for more HTTP error codes (401, 408, 500, 502, 503, 504, 499, 599)
- Better session management and logout handling
 
- Network Manager Architecture: Enhanced DefaultBaseNetworkManagerimplementation- Improved HTTP adapter selection for cross-platform compatibility
- Better error handling and response processing
- Enhanced request/response logging with structured data
 
- Code Quality Improvements: Updated analysis options with comprehensive linting
- Integrated flutter_custom_lintsfor enhanced code quality
- Added public_member_api_docsrule for better documentation
- Improved type safety and null safety throughout the codebase
 
- Integrated 
Technical #
- Connectivity Infrastructure: New connectivity checking system with multiple validation layers
- Logging Architecture: Centralized logging system with AppLoggerintegration
- Error Handling: Enhanced error recovery mechanisms with intelligent retry logic
- Platform Compatibility: Improved cross-platform support with conditional imports
- Performance: Optimized network request handling with better resource management
Migration Notes #
- The connectivity interceptor now requires ConnectivityCheckConfigfor configuration
- New dependencies (flutter_connectivity_manager,app_logger_manager) need to be added
- Enhanced logging capabilities require AppLoggerinstance for optimal functionality
1.0.4 - 2025-06-20 #
Added #
- Comprehensive Example App: Complete Flutter example application demonstrating all package features
- Real API integration with JSONPlaceholder for testing
- Interactive UI for testing different HTTP methods (GET, POST, PUT, DELETE)
- User, Post, and Country model examples with proper data parsing
- Network connectivity monitoring and error handling demonstrations
- Custom services implementation examples (Logger, Connectivity, Network)
 
- Enhanced Model Structure: Improved data model implementations with better type safety
- DefaultErrorModelwith field-specific error handling and validation error support
- ListResponseModelwith generic type support for list responses
- Better JSON parsing with null safety and default value handling
 
Changed #
- Network Manager Architecture: Enhanced DefaultBaseNetworkManager implementation
- Conditional import system for platform-specific adapters (IO vs Web)
- Improved HTTP adapter selection for cross-platform compatibility
- Better error handling and response processing
 
- Authentication System: Strengthened AuthInterceptor with advanced features
- Enhanced token refresh logic with automatic retry mechanisms
- Improved session management and logout handling
- Better error recovery for network timeout scenarios
- Advanced retry logic for various HTTP error codes (401, 408, 500, 502, 503, 504, 499, 599)
 
- JWT Helpers: Enhanced JWT token handling utilities
- Improved token validation and expiration checking
- Better error handling for malformed tokens
- Enhanced base64 decoding with proper normalization
 
- HTTP Method Types: Enhanced MethodTypes enum with extension methods
- Added findmethod for string-based method type lookup
- Improved case-insensitive comparison capabilities
 
- Added 
- Dependencies: Updated package dependencies
- Flutter Shared Utilities updated to v1.0.2
- Collection package updated to v1.19.1
- Maintained Dio v5.8.0+1 for HTTP client functionality
 
Improved #
- Type Safety: Enhanced null safety and type checking throughout the codebase
- Error Handling: More comprehensive error models with detailed error information
- Platform Support: Better cross-platform compatibility with conditional imports
- Code Quality: Improved linting and code structure following Flutter best practices
- Documentation: Enhanced inline documentation and example implementations
Technical #
- Platform Adapters: Conditional import system for io_adapter.dartandweb_adapter.dart
- Background Transformers: Custom data transformation capabilities
- Interceptor Chain: Improved interceptor management and error recovery
- Response Models: Generic type support for better type safety
- Token Management: Enhanced token lifecycle management with automatic refresh
1.0.3 - 2025-06-19 #
- Integrate flutter SDK to fix dependency bug
1.0.2 - 2025-06-18 #
- Update the folder structure
1.0.1 - 2025-06-18 #
Added #
- Enhanced error handling with more detailed error messages
- Improved network connectivity detection
- Better token refresh mechanism
- Additional logging options for debugging
Changed #
- Updated Dio dependency to latest stable version
- Improved performance for large file uploads
- Enhanced type safety for response models
Fixed #
- Fixed issue with token expiration handling
- Resolved memory leak in long-running requests
- Fixed connectivity interceptor edge cases
- Corrected JSON parsing for nested objects
1.0.0 #
- Initial release of Flutter Client Network Manager
- Comprehensive network manager interface with generic type support
- Default implementation using Dio HTTP client
- Authentication support with token management
- Built-in interceptors for connectivity and logging
- File upload and download capabilities with progress tracking
- Comprehensive error handling with multiple error model types
- Response caching with configurable expiration
- Cross-platform support (iOS, Android, Web, Desktop)
- Custom transformers for background processing
- Header management functionality
- Interceptor management (add, remove, insert)
- Type-safe response models
- Support for all HTTP methods (GET, POST, PUT, DELETE, PATCH)
- Query parameter support
- URL suffix support
- Request cancellation support
- Progress callbacks for uploads and downloads
- Automatic JSON serialization/deserialization
- Network constants configuration
- JWT helper utilities
- Status code helper utilities
- JSON helper utilities
- Platform-specific adapters (IO and Web)
- Custom background transformers
- Token repository for authentication management
- Auth interceptor for automatic token handling
- Connectivity interceptor for network status checking
- Custom log interceptor for request/response logging
Features #
- NetworkManager Interface: Abstract interface defining all network operations
- DefaultBaseNetworkManager: Concrete implementation using Dio
- Error Models: DefaultErrorModel, NetworkErrorsModel, ResponseErrorsModel, InternalErrorsModel
- Response Models: BaseNetworkResponseModel, BaseNetworkSuccessModel, ListResponseModel
- Interceptors: AuthInterceptor, ConnectivityInterceptor, CustomLogInterceptor
- Utilities: JWT helpers, JSON helpers, status code helpers
- Platform Support: IO and Web adapters for cross-platform compatibility
Technical Details #
- Built with Dio 5.8.0+1 for HTTP client functionality
- Uses flutter_shared_utilities for shared utilities
- Implements custom linting rules for code quality
- Full type safety with generic response models
- Comprehensive documentation and examples