flutter_connectivity_manager 1.0.4 copy "flutter_connectivity_manager: ^1.0.4" to clipboard
flutter_connectivity_manager: ^1.0.4 copied to clipboard

A comprehensive Flutter connectivity manager package with authentication, interceptors, and error handling support.

1.0.4 #

  • Fix linter problems
  • Add additional public API documentations

1.0.3 #

πŸš€ Major Enhancements #

🏭 Factory-Based Initialization (Breaking Change)

  • New Factory Pattern: Introduced ConnectivityManagerFactory for proper async initialization
    • ConnectivityManagerFactory.create() - Custom configuration
    • ConnectivityManagerFactory.createForDevelopment() - Development preset
    • ConnectivityManagerFactory.createForProduction() - Production preset
    • ConnectivityManagerFactory.createMinimal() - Minimal preset
    • ConnectivityManagerFactory.createAggressive() - Aggressive preset
  • Breaking Change: Direct instantiation of ConnectivityManagerImpl is no longer allowed
  • Improved Reliability: Factory methods ensure proper async initialization before use
  • Better Error Prevention: Eliminates initialization-related runtime errors

⚑ Enhanced Connection Speed Classification

  • New Speed Levels: Added fast (10-50 Mbps) and unknown speed classifications
  • Complete Speed Range:
    • none: No connection
    • poor: < 50 Kbps
    • slow: 50 Kbps - 500 Kbps
    • moderate: 500 Kbps - 2 Mbps
    • good: 2-10 Mbps
    • fast: 10-50 Mbps (new)
    • excellent: > 50 Mbps
    • unknown: Speed not tested/determinable (new)
  • Enhanced Helper Methods:
    • isUsable - Checks if connection is suitable for basic operations
    • isGoodForMultimedia - Checks if suitable for high-quality multimedia
    • isModerateForMultimedia - Checks if suitable for moderate multimedia
    • description - Human-readable speed descriptions

πŸ›‘οΈ Improved Error Handling

  • Stack Trace Support: Error states now include stack traces for better debugging
  • Enhanced Error Context: More detailed error information in connectivity states
  • Better Error Recovery: Improved error handling throughout the connectivity checking process

πŸ”§ Technical Improvements

  • Async Initialization: All factory methods perform initial connectivity checks
  • Better Resource Management: Improved lifecycle management with proper initialization
  • Enhanced Documentation: Updated code documentation with new factory patterns
  • Stricter Type Safety: Better type safety with factory-based initialization

πŸ“ Migration Guide #

Before (v1.0.2):

final manager = ConnectivityManagerImpl();
await manager.startMonitoring();

After (v1.0.3):

final manager = await ConnectivityManagerFactory.createForProduction();
await manager.startMonitoring();

πŸ”„ Updated Example App #

  • Factory Usage: Example app now demonstrates proper factory-based initialization
  • Better Error Handling: Improved error handling and user feedback
  • Enhanced UI: Better visual feedback for connection states

1.0.2 #

πŸš€ Enhancements #

πŸ“Š Connection Speed Classification

  • Added Moderate Speed Classification: Enhanced connection speed detection with a new moderate speed category
    • slow: 50 Kbps - 500 Kbps (adjusted from 50 Kbps - 1 Mbps)
    • moderate: 500 Kbps - 2 Mbps (new category)
    • good: 2-10 Mbps (adjusted from 1-10 Mbps)
  • Improved Speed Testing Algorithm: Refined response time thresholds for more accurate speed classification
  • Enhanced Quality Scoring: Updated connection quality scoring to account for the new moderate speed category
  • Better User Experience: More granular speed feedback for users in the moderate connection range

πŸ”§ Technical Improvements

  • Updated ConnectionSpeed enum with new moderate classification
  • Enhanced testConnectionSpeed() method with refined timing thresholds
  • Improved getConnectionQualityScore() to include moderate speed scoring
  • Added isModerateForMultimedia helper method for multimedia capability assessment

1.0.1 #

πŸ”§ Improvements #

πŸ“ Code Organization

  • Improved Project Structure: Refactored codebase for better organization and maintainability
  • File Reorganization: Moved connectivity result extensions to dedicated utils folder
  • Implementation Consolidation: Streamlined implementation files structure
  • Enhanced Separation of Concerns: Better separation between interfaces, implementations, models, and utilities

πŸ› οΈ Technical Changes

  • Reorganized connectivity_result_extensions.dart location for better project structure
  • Consolidated implementation files for improved maintainability
  • Updated imports and exports to reflect new file structure
  • Enhanced code organization following clean architecture principles

πŸ“¦ Dependencies

  • Maintained compatibility with existing dependency versions
  • No breaking changes to public API

1.0.0 #

πŸŽ‰ Initial Release #

✨ Features

  • Comprehensive Connectivity Management: Complete connectivity monitoring with real-time updates
  • Internet Access Verification: Not just network connection - actual internet accessibility testing
  • Connection Speed Detection: Automatic connection speed/quality assessment (None, Poor, Slow, Moderate, Good, Excellent)
  • Multiple Connection Type Support: WiFi, Mobile, Ethernet, Bluetooth, VPN detection
  • Flexible Configuration: Customizable timeouts, retry attempts, test URLs, and monitoring intervals
  • Background Monitoring: Optional background connectivity checks with configurable intervals
  • Connection State Caching: Performance optimization with configurable cache duration
  • Advanced Testing Capabilities: Ping tests, URL reachability checks, bandwidth assessment
  • Connection Waiting: Wait for specific connection types or internet availability with timeout
  • Stream-based Architecture: Reactive programming support with multiple event streams
  • Error Handling: Comprehensive error handling with detailed error information
  • Resource Management: Proper lifecycle management with pause/resume/dispose methods

πŸ“± Streams & Events

  • onConnectivityChanged: Complete connectivity state changes
  • onInternetAvailabilityChanged: Internet availability status updates
  • onNetworkTypeChanged: Network type changes (WiFi, Mobile, etc.)

βš™οΈ Configuration Presets

  • Production: Balanced configuration for production apps
  • Development: Faster checks and more detailed logging for development
  • Minimal: Resource-efficient configuration for battery-sensitive apps
  • Aggressive: Frequent monitoring for real-time applications

πŸ› οΈ Advanced Methods

  • Connection speed testing with customizable test URLs
  • Network quality scoring (0.0 to 1.0)
  • Bandwidth-intensive operation capability checks
  • Host ping functionality with configurable timeouts
  • Detailed network information retrieval
  • Manual connectivity testing with custom options

πŸ—οΈ Architecture

  • Clean architecture with interface-based design (IConnectivityManager)
  • Factory pattern for easy instance creation
  • Thread-safe implementation with proper resource management
  • Extensible design for custom implementations

πŸ“¦ Dependencies

  • connectivity_plus: ^6.1.4 - Core connectivity detection
  • internet_connection_checker_plus: ^2.7.2 - Internet accessibility verification
  • flutter_shared_utilities: ^1.0.3 - Shared utility functions

πŸ“š Documentation

  • Comprehensive API documentation
  • Example app demonstrating all features
  • Configuration guides and best practices
0
likes
160
points
144
downloads

Publisher

unverified uploader

Weekly Downloads

A comprehensive Flutter connectivity manager package with authentication, interceptors, and error handling support.

Repository (GitHub)
View/report issues

Topics

#connectivity #internet-connection #internet-check #internet #connectivity-manager

Documentation

API reference

License

MIT (license)

Dependencies

connectivity_plus, flutter, flutter_shared_utilities, internet_connection_checker_plus, rxdart

More

Packages that depend on flutter_connectivity_manager