responsive_adaptive 1.0.2 copy "responsive_adaptive: ^1.0.2" to clipboard
responsive_adaptive: ^1.0.2 copied to clipboard

A comprehensive Flutter responsive adaptive package that provides responsive adaptive utilities.

Changelog #

All notable changes to the ResponsiveAdaptiveManager package will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.0.2 - 2025-06-28 #

  • Enable debug mode in ResponsiveAdaptiveManager, update DebugInfoPanel to use the manager instance directly, and refactor device type detection logic for improved performance and clarity. Additionally, enhance the UI of DebugInfoPanel for better responsiveness and usability.

1.0.1 - 2025-06-27 #

Added #

  • Configurable Baseline Dimensions

    • Added baselineScreenWidth and baselineScreenHeight to ResponsiveConfig
    • Added platform-optimized baseline constants to ResponsiveConstants:
      • baselineScreenWidth and baselineScreenHeight (default 375x812)
      • materialDesignBaselineWidth and materialDesignBaselineHeight (360x800)
      • cupertinoBaselineWidth and cupertinoBaselineHeight (375x812)
      • androidBaselineWidth and androidBaselineHeight (360x640)
      • webBaselineWidth and webBaselineHeight (1920x1080)
      • tabletBaselineWidth and tabletBaselineHeight (768x1024)
  • ResponsiveConfig Factory Constructors

    • ResponsiveConfig.materialDesign() - Material Design 3 optimized baseline
    • ResponsiveConfig.cupertino() - iOS/Cupertino design baseline
    • ResponsiveConfig.androidFirst() - Android-first design baseline
    • ResponsiveConfig.webOptimized() - Web/desktop optimized baseline
  • Baseline Examples Utility

    • BaselineExamples class with comprehensive baseline configuration examples
    • Comparison methods to demonstrate scaling differences
    • Best practice recommendations based on app type
    • Interactive comparison widget for debugging
  • Documentation

    • BASELINE_DIMENSIONS.md - Comprehensive guide on baseline configurations
    • Migration guide from hardcoded values
    • Performance considerations and best practices

Changed #

  • Breaking Change (Backward Compatible): Replaced hardcoded iPhone dimensions (375x812) with configurable baseline dimensions
    • responsiveWidth() now uses config.baselineScreenWidth instead of hardcoded 375.0
    • responsiveHeight() now uses config.baselineScreenHeight instead of hardcoded 812.0
    • Default configuration maintains original iPhone baseline for backward compatibility

Improved #

  • Design System Flexibility: Apps can now choose baselines that match their target platform
  • Cross-Platform Optimization: Better scaling results for Android, web, and desktop platforms
  • Configuration Architecture: More consistent use of constants throughout the codebase

Performance #

  • No Runtime Impact: Baseline values are set at configuration time with no performance penalty
  • Maintained Caching: All existing performance optimizations continue to work

Migration #

  • Existing Apps: Continue to work without changes (default maintains iPhone baseline)
  • Recommended: Update to use platform-appropriate baselines:
    • Android/Material apps: Use ResponsiveConfig.materialDesign()
    • iOS apps: Use ResponsiveConfig.cupertino()
    • Web/Desktop apps: Use ResponsiveConfig.webOptimized()

1.0.0 - 2025-06-27 #

  • Core Architecture

    • IResponsiveAdaptiveManager - Abstract interface for dependency inversion
    • ResponsiveAdaptiveManager - Singleton concrete implementation
    • Complete dependency injection support with abstract interface pattern
  • Data Models (extending BaseDataModel from flutter_shared_utilities)

    • ResponsiveConfig - Configuration for responsive behavior
    • AdaptiveBreakpoints - Breakpoint definitions with custom support
    • ResponsiveSettings - Comprehensive settings management
    • DeviceInfo - Device information with platform detection
  • Enums for Type Safety

    • DeviceType - Mobile, tablet, desktop, ultra-wide, foldable, watch, TV
    • ScreenSize - Extra small to extra large with comparison methods
    • OrientationType - Portrait, landscape, square with detection
    • PlatformType - iOS, Android, Web, Windows, macOS, Linux, Fuchsia
  • Responsive Calculations

    • Dynamic width and height scaling based on screen size
    • Intelligent font size scaling with accessibility support
    • Responsive spacing, padding, and margin calculations
    • Border radius and icon size scaling
    • Platform-specific scaling factors
  • Percentage-Based Layouts

    • Screen width and height percentage calculations
    • Safe area percentage support for notch-aware layouts
    • Responsive container sizing
  • Adaptive Layout System

    • Screen size-based adaptive values with fallbacks
    • Device type-based column count adaptation
    • Aspect ratio adaptation for different devices
    • Layout helper methods for navigation patterns
  • Breakpoint Management

    • Default breakpoint definitions (320, 480, 768, 1024, 1440)
    • Custom breakpoint support with named breakpoints
    • Breakpoint comparison methods (larger than, smaller than)
    • Screen size navigation (next larger/smaller)
  • Platform Integration

    • Automatic platform detection and handling
    • Platform-specific spacing and font size adjustments
    • Safe area handling with insets support
    • MediaQuery integration for responsive media queries
  • Accessibility Support

    • System accessibility settings integration
    • High contrast mode detection
    • Reduce motion support for animations
    • Bold text preference handling
    • Minimum touch target size enforcement
    • Accessible font size and spacing calculations
  • Performance Optimizations

    • Intelligent caching system for responsive calculations
    • Cache statistics and management (hits, misses, size)
    • Configurable cache size limits with automatic cleanup
    • Lazy loading of device information
    • Efficient event listener management
  • Animation Support

    • Responsive animation duration scaling
    • Platform-appropriate animation curves
    • System reduce motion integration
    • Animation enable/disable based on settings and accessibility
  • Event System

    • Device info change listeners
    • Settings change listeners
    • Error handling for listener callbacks
    • Automatic cleanup on disposal
  • Debug and Development Tools

    • Debug mode with comprehensive logging
    • Detailed debug information export
    • Responsive calculation logging
    • Cache statistics monitoring
    • Performance metrics tracking
  • Widget Builders

    • buildResponsive() - Screen size-based widget building
    • buildAdaptive() - Device type-based widget building
    • Safe area widget wrapping
    • Responsive media query application
  • Constants and Utilities

    • Comprehensive responsive constants
    • Default breakpoint values
    • Platform-specific constants (iOS safe areas, Android status bar)
    • Touch target size guidelines
    • Typography and spacing scales

Features #

  • Cross-Platform Support: iOS, Android, Web, Windows, macOS, Linux
  • Device Detection: Automatic detection with manual override support
  • Responsive Design: Intelligent scaling across all screen sizes
  • Adaptive Layouts: Dynamic layout switching based on context
  • Accessibility: Full system accessibility integration
  • Performance: Optimized calculations with intelligent caching
  • Customization: Extensive configuration options
  • Developer Experience: Comprehensive debugging and logging tools

Implementation Details #

  • Uses flutter_shared_utilities for safe parsing and BaseDataModel
  • Singleton pattern for global access with proper dependency injection
  • Comprehensive error handling with stack trace preservation
  • Memory-efficient caching with automatic cleanup
  • Type-safe enum comparisons and conversions
  • Platform-aware calculations and adjustments

Breaking Changes #

  • This is the initial release, no breaking changes from previous versions

Migration Guide #

  • For new projects: Follow the Quick Start guide in README.md
  • Integration requires minimal setup with default configurations available
  • All methods are documented with comprehensive examples

Dependencies #

  • flutter_shared_utilities: ^1.0.11
  • Flutter SDK: >=3.19.0
  • Dart SDK: ^3.8.1

Documentation #

  • Complete README.md with setup instructions and usage examples
  • Comprehensive API reference with all methods documented
  • Advanced usage examples for custom configurations
  • Performance guidelines and best practices
  • Accessibility implementation guide
0
likes
160
points
48
downloads

Publisher

unverified uploader

Weekly Downloads

A comprehensive Flutter responsive adaptive package that provides responsive adaptive utilities.

Repository (GitHub)
View/report issues

Topics

#responsive #adaptive #auto-layout #layout #size

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_shared_utilities

More

Packages that depend on responsive_adaptive