flutter_network_watcher 0.0.5
flutter_network_watcher: ^0.0.5 copied to clipboard
Real-time network connectivity monitoring with offline queue management for Flutter applications.
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.
[Unreleased] #
0.0.5 - 2025-12-06 #
Fixed #
- Static Analysis: Fixed all 533 info-level issues and 3 warnings
- Resolved all line length violations (80 character limit)
- Fixed single-line if statements to use proper braces
- Improved exception handling with specific exception types (
on Exception catch) - Fixed unawaited/discarded futures using
unawaited()helper - Replaced
printstatements withdebugPrintfor production safety - Fixed cascade invocations for better code style
- Corrected all catch clauses to specify exception types
- Linter Compliance: Achieved 100% compliance with all enabled linter rules
- Made
NetworkRequestclass immutable with@immutableannotation - Fixed plugin class to include instance members (avoided static-only class)
- Removed all ignore comments by fixing underlying issues
- Made
- Test Code Quality: Fixed all test file issues
- Added proper type annotations for dynamic calls
- Used
constliterals for immutable class constructors - Fixed line length issues in test files
- Updated to use named constants (
NetworkWatcherConfig.defaultConfig)
Enhanced #
- Code Quality: Achieved perfect static analysis with 0 errors, 0 warnings, 0 info issues
- Documentation: Maintained 98.9% API documentation coverage (183/185 elements)
- Pana Score: Achieved perfect 160/160 pana analysis score
- Type Safety: Improved type safety with proper annotations and const usage
- Exception Handling: Enhanced exception handling with specific catch clauses
Technical Improvements #
- Converted
NetworkRequestto immutable class with@immutableannotation - Added instance method to plugin class for better linter compliance
- Improved code formatting and style consistency
- Enhanced test code quality and maintainability
- All linter rules now pass without any ignore comments
0.0.4 - 2025-01-09 #
Fixed #
- Perfect Pana Score: Achieved full 160/160 Pana analysis score
- Static Analysis: Fixed all linting issues and code formatting
- Exception Handling: Improved catch clauses with specific exception types
- Code Organization: Fixed import ordering and constructor placement
- Override Annotations: Corrected @override annotations throughout the codebase
Enhanced #
- Code Quality: Perfect static analysis compliance with no warnings or errors
- Documentation: Maintained 97.3% API documentation coverage
- Platform Support: Full support for all 6 Flutter platforms (iOS, Android, Web, Windows, macOS, Linux)
- Dependency Management: All dependencies are up-to-date and compatible
Technical Improvements #
- Resolved all static analysis warnings and errors
- Improved exception handling with specific exception types
- Enhanced code organization and formatting
- Perfect Pana analysis score achievement
- Maintained comprehensive platform support
0.0.3 - 2025-01-09 #
Fixed #
- Platform Abstraction: Removed direct connectivity_plus imports from main NetworkWatcher class
- Code Formatting: Fixed all formatting issues to achieve perfect Pana score
- Test Compatibility: Updated tests to work without Flutter binding requirements
- Method Visibility: Improved @visibleForTesting annotations for better unit testing
Enhanced #
- Swift Package Manager: Added complete SPM source file implementations
- Platform Independence: Better abstraction layer for cross-platform compatibility
- Code Quality: Achieved perfect 160/160 Pana analysis score
- Testing: Simplified unit tests to focus on logic rather than platform integration
Technical Improvements #
- Platform-agnostic NetworkWatcher API
- Removed ConnectivityResult exposure from public API
- Enhanced platform abstraction with proper conditional imports
- Perfect code formatting and linting compliance
- Complete SPM implementation with proper Swift source files
0.0.2 - 2025-01-09 #
Added #
- Multi-Platform Support: Extended platform support to all 6 Flutter platforms
- ✅ Web platform support with WASM compatibility
- ✅ Windows desktop support with C++ implementation
- ✅ macOS desktop support with Swift implementation
- ✅ Linux desktop support with C++ implementation
- Swift Package Manager (SPM) Support: Full SPM integration for iOS and macOS
- Platform Abstraction Layer: Conditional imports for WASM compatibility
- Web Plugin Implementation: Native web plugin registration
- Desktop Native Plugins: Complete CMake configurations for Windows and Linux
Fixed #
- WASM Compatibility: Resolved
dart:ioimport issues preventing web compilation - Platform Declaration: Updated pubspec.yaml to properly declare all platform support
- Conditional Imports: Implemented platform-specific code loading to avoid compilation errors
Changed #
- Architecture: Refactored to use platform abstraction pattern
- Code Organization: Split implementation into platform-specific modules
- Dependencies: Added
flutter_web_pluginsfor web platform support
Technical Improvements #
- Platform-specific implementations use conditional exports
- Native plugin boilerplate for all desktop platforms
- Proper CMake configurations for Windows and Linux
- Swift Package Manager manifest and source structure
- Web platform plugin registration with Flutter Web
Platform Support Matrix #
- Mobile: Android ✅, iOS ✅ (CocoaPods + SPM)
- Web: Web ✅ (with WASM compatibility)
- Desktop: Windows ✅, macOS ✅, Linux ✅
0.0.1 - 2024-01-20 #
Added #
- Initial release of flutter_network_watcher
- Real-time network connectivity monitoring
- Offline queue management system
- Automatic request queuing during offline periods
- Network state change notifications
- Persistent queue storage using SharedPreferences
- RxDart streams for reactive programming
- Comprehensive error handling
- Support for custom retry policies
- Background network monitoring
- Flutter plugin architecture for platform-specific implementations
Features #
- NetworkWatcher: Core class for monitoring network connectivity
- OfflineQueue: Queue management for offline requests
- NetworkRequest: Model for queued network requests
- ConnectivityState: Enum for network connection states
- NetworkWatcherConfig: Configuration options for the network watcher
- Stream-based API: Reactive programming with RxDart
- Persistent Storage: Automatic queue persistence across app sessions
- Retry Mechanism: Configurable retry policies for failed requests
- Platform Support: Android and iOS compatibility
Documentation #
- Comprehensive API documentation
- Usage examples and code samples
- Integration guide for Flutter applications
- Migration guide for existing network implementations