keyboard_safe 1.0.0 copy "keyboard_safe: ^1.0.0" to clipboard
keyboard_safe: ^1.0.0 copied to clipboard

A lightweight Flutter widget that prevents keyboard overflow by automatically adjusting layout, scrolling input fields into view, and providing sticky footers above the keyboard.

Changelog #

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

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

1.0.0 - 2025-07-27 #

πŸŽ‰ Major Release: Transform from basic package to comprehensive keyboard handling solution!

This release represents a complete evolution of keyboard_safe into one of the most feature-rich keyboard handling packages in the Flutter ecosystem. Built with real-world usage patterns and UX best practices in mind.

πŸ†• New Features #

  • 🎯 Intelligent Auto-Scroll: Automatically scrolls focused input fields into view with configurable alignment and timing
  • πŸ“Œ Advanced Footer Management: Choose between screen-bottom footers (recommended UX) or persistent floating footers
  • πŸ‘† Tap-to-Dismiss: Native-like keyboard dismissal when tapping outside input fields
  • πŸ›‘οΈ SafeArea Integration: Optional SafeArea wrapping for devices with notches and navigation bars
  • πŸ“ž Keyboard State Callbacks: Real-time notifications when keyboard appears/disappears with height information
  • 🎬 Customizable Animations: Configurable duration and curves for all keyboard-related transitions
  • πŸ”„ Reverse Scroll Support: Perfect for chat interfaces where new content appears at the bottom
  • 🎨 Flexible Layout Options: Multiple layout strategies optimized for different use cases

πŸ”§ API Enhancements #

  • Enhanced Constructor: Added comprehensive parameter documentation with usage examples
  • Static Methods: KeyboardSafe.dismissKeyboard(context) for programmatic keyboard control
  • Robust Error Handling: Graceful handling of edge cases and invalid widget contexts
  • Performance Optimizations: Reduced unnecessary rebuilds and improved animation performance
  • Better Resource Management: Enhanced disposal patterns and memory leak prevention

πŸ“– Documentation Overhaul #

  • Complete README Rewrite: Comprehensive usage examples, API reference, and best practices
  • Detailed API Documentation: Every parameter now includes detailed descriptions and usage guidance
  • Migration Guide: Clear path for upgrading from v0.0.x versions
  • UX Guidelines: Explicit guidance on when to use different footer behaviors
  • Multiple Usage Patterns: Examples for forms, chat interfaces, and full-screen experiences

πŸ—οΈ Architecture Improvements #

  • Clean Separation of Concerns: Dedicated methods for different layout strategies
  • Enhanced State Management: Better tracking of keyboard state and widget lifecycle
  • Defensive Programming: Added null checks, mounted checks, and disposal guards
  • Type Safety: Improved parameter validation with assertions

🎨 UX-First Design Decisions #

  • Smart Footer Defaults: persistFooter: false by default for better mobile UX
  • Optimized Scroll Alignment: Focused fields appear in the upper 20% of visible area
  • Smooth Animations: Default 250ms duration with Curves.easeOut for responsive feel
  • Bouncing Physics: Native iOS-like scroll behavior for polished experience

πŸ§ͺ Testing & Quality #

  • Expanded Test Suite: Comprehensive widget tests covering all major features
  • Performance Testing: Verified smooth animations and efficient resource usage
  • Edge Case Handling: Robust behavior in complex widget hierarchies
  • Cross-Platform Validation: Tested on iOS, Android, Web, and Desktop

πŸ“± Real-World Ready #

  • Production Tested: Architecture validated in real-world Flutter applications
  • Memory Efficient: Optimized disposal patterns prevent memory leaks
  • Accessibility Considered: Semantic structure maintained for screen readers
  • Multi-Platform: Full support for all Flutter target platforms

πŸ”„ Backward Compatibility #

  • βœ… Zero Breaking Changes: All existing v0.0.x code continues to work unchanged
  • Gradual Adoption: New features are opt-in with sensible defaults
  • Migration Friendly: Smooth upgrade path with clear documentation

πŸ“Š Package Quality #

  • Perfect Pub Score: Maintains 160/160 pub.flutter-io.cn score with enhanced features
  • Comprehensive Documentation: 100% API coverage with detailed examples
  • Industry Standards: Follows Flutter and Dart best practices throughout
  • Community Ready: Clear contributing guidelines and issue templates

0.0.2 - 2025-07-22 #

πŸŽ‰ Improvements and refinements:

✨ Features #

  • βœ… Added advanced full demo with toggle (with vs. without KeyboardSafe)
  • πŸ§ͺ DartPad-compatible demo added (dartpad_demo.dart)

🎨 UI/UX #

  • πŸ“± Polished dark theme UI with custom fonts and layout
  • πŸ”§ Enhanced visual demo experience

πŸ“– Documentation #

  • πŸ“„ Added dartdoc comments to public APIs (passed 20% threshold)
  • 🧼 Improved README with installation, usage, and example guidance
  • πŸ”§ Added issue tracker URL to pubspec metadata

πŸ§ͺ Testing #

  • βœ… Enhanced example app demonstrating package benefits

0.0.1 - 2025-07-21 #

πŸš€ Initial Release: The foundation of intelligent keyboard handling in Flutter!

🎯 Core Features #

  • βœ… Automatic keyboard overflow prevention with padding adjustment
  • πŸ“± Basic SingleChildScrollView integration for scrollable content
  • 🎬 Smooth animated transitions when keyboard appears/disappears
  • πŸ”§ Configurable animation duration and curves

πŸ“¦ Package Essentials #

  • πŸ“„ MIT License for open-source usage
  • πŸ“– Basic documentation and usage examples
  • πŸ§ͺ Initial test coverage for core functionality
  • πŸš€ Multi-platform support (iOS, Android, Web, Desktop)

πŸ—οΈ Foundation Architecture #

  • 🎯 Clean StatefulWidget implementation with WidgetsBindingObserver
  • πŸ“± MediaQuery integration for keyboard height detection
  • 🎬 AnimatedPadding for smooth layout transitions
  • 🧼 Proper resource cleanup and disposal patterns

This initial release solved the fundamental problem of keyboard overflow in Flutter apps, setting the foundation for the comprehensive solution that keyboard_safe has become today.


πŸš€ What's Next? #

We're constantly improving keyboard_safe based on community feedback and real-world usage patterns. Future enhancements may include:

  • 🎨 Preset Configurations: Common setups for forms, chat, and other patterns
  • πŸ”§ Advanced Customization: More granular control over scroll behavior
  • πŸ“± Platform-Specific Optimizations: Enhanced behavior for different platforms
  • πŸ§ͺ Developer Tools: Debug overlays and performance monitoring
  • 🌐 Internationalization: Better support for RTL languages and different locales

Have suggestions? Open an issue or start a discussion!

19
likes
160
points
384
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight Flutter widget that prevents keyboard overflow by automatically adjusting layout, scrolling input fields into view, and providing sticky footers above the keyboard.

Repository (GitHub)
View/report issues

Topics

#keyboard #layout #textfields #overflow #focus

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on keyboard_safe