flutter_floating_window 1.1.0
flutter_floating_window: ^1.1.0 copied to clipboard
A comprehensive Flutter plugin for creating and managing floating window overlays on Android devices. Features include interactive UI elements, real-time data synchronization, persistent storage, and [...]
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.0 - 2024-01-15 #
Added #
- Initial release of Flutter Floating Window plugin
- Core floating window functionality for Android
FloatingWindowManagerclass for window managementFloatingWindowConfigclass for window configurationFloatingWindowEventsystem for real-time event handlingFloatingWindowExceptionfor comprehensive error handling- Support for multiple simultaneous floating windows
- Draggable and resizable window capabilities
- Customizable window appearance (size, position, opacity, colors)
- Persistent windows that survive app closure
- Service-based architecture for reliability
- Boot persistence - windows restore after device reboot
- Automatic overlay permission handling
- Data communication between Flutter and floating windows
- Comprehensive example app demonstrating all features
- Complete API documentation and setup guide
Features #
-
Window Management:
- Create multiple floating overlay windows
- Close individual or all windows
- Get list of active windows
- Move and resize windows programmatically
-
Customization:
- Configurable window size and position
- Adjustable opacity (0.0 to 1.0)
- Custom background colors
- Optional close button
- Draggable and resizable options
-
Event System:
- Real-time window event notifications
- Window creation/closure events
- Click and interaction events
- Movement and resize events
- Error event handling
-
Data Communication:
- Send data from Flutter to floating windows
- Receive data from window interactions
- JSON-based data exchange
-
Persistence:
- Windows survive app closure
- Service continues running in background
- Boot receiver for device restart persistence
- Configurable service lifecycle
-
Permission Handling:
- Automatic overlay permission detection
- Guided permission request flow
- Runtime permission status checking
Technical Implementation #
-
Flutter Side:
- Method channels for Flutter-Android communication
- Event channels for real-time updates
- Comprehensive error handling with custom exceptions
- Stream-based event system
- Type-safe configuration classes
-
Android Side:
- Kotlin implementation for modern Android development
- Foreground service for reliable operation
- WindowManager integration for overlay creation
- Boot receiver for persistence across reboots
- Proper lifecycle management
Requirements #
- Flutter SDK: >=3.0.0
- Dart SDK: >=3.0.0
- Android: API level 23+ (Android 6.0+)
- Permissions: SYSTEM_ALERT_WINDOW, FOREGROUND_SERVICE
Example Usage #
// Basic window creation
final config = FloatingWindowConfig(
width: 300,
height: 200,
title: 'My Window',
isDraggable: true,
);
final windowId = await FloatingWindowManager().createWindow(config);
Known Limitations #
- Android only (iOS doesn't support overlay windows)
- Requires API level 23+ for full functionality
- Users must manually grant overlay permission
- Some Android manufacturers may have additional restrictions
Breaking Changes #
- None (initial release)
Migration Guide #
- None (initial release)
1.1.0 - 2024-01-16 #
Added #
- Enhanced example app with interactive counter functionality
- Real-time data synchronization between main app and floating windows
- SharedPreferences integration for persistent data storage
- Interactive '+' and '-' buttons in floating windows
- Counter display with real-time updates
- Improved UI with modern Material Design components
- Enhanced error handling and user feedback
- Updated permission flow with automatic service start
- Comprehensive testing and validation
Enhanced #
- Example app now demonstrates advanced features
- Better integration with Android SDK 36
- Improved window creation with named parameters
- Enhanced documentation and code examples
- Better error messages and user guidance
Fixed #
- Compatibility issues with shared_preferences_android
- Method signature corrections for createSimpleWindow
- Android build configuration updates
[Unreleased] #
Planned Features #
- Enhanced window animations
- Custom window layouts and widgets
- Improved battery optimization handling
- Additional window interaction gestures
- Performance optimizations
- Extended customization options
Version History #
- 1.0.0 - Initial release with core floating window functionality
Contributing #
When contributing to this project, please:
- Follow the existing changelog format
- Add entries under the
[Unreleased]section - Move entries to a new version section when releasing
- Include breaking changes and migration notes when applicable
- Reference issue numbers when relevant
Release Process #
- Update version in
pubspec.yaml - Move unreleased changes to new version section
- Add release date
- Create git tag with version number
- Publish to pub.dev
- Create GitHub release with changelog notes