flutter_exit_app 2.0.0  flutter_exit_app: ^2.0.0 copied to clipboard
flutter_exit_app: ^2.0.0 copied to clipboard
A Flutter plugin that provides a platform-specific way to exit the app without calling exit(0) in Dart code.
2.0.0 #
Major modernization update with breaking changes
Breaking Changes #
- BREAKING: Minimum Flutter version is now 3.10.0
- BREAKING: Minimum Dart version is now 3.0.0
- BREAKING: Minimum Android API level is now 21 (Android 5.0)
- BREAKING: Minimum iOS version is now 12.0
- BREAKING: Return type changed from Future<bool?>toFuture<bool>
Android Improvements #
- MIGRATION: Migrated from Java to Kotlin for better performance and maintainability
- Updated Android Gradle Plugin to 8.1.0
- Updated Gradle to 8.4
- Updated compileSdk to 34
- Added namespace declaration for AGP 8.x compatibility
- Improved error handling with null-safety
- Better activity lifecycle management
- Cleaner, more idiomatic Kotlin code
iOS Improvements #
- Refactored iOS implementation to follow Apple best practices
- Added proper app lifecycle notification handling (willResignActiveNotification,didEnterBackgroundNotification)
- Improved graceful exit: app moves to background and suspends (iOS recommended behavior)
- Force-kill mode now includes 0.5s cleanup delay for proper state saving
- Better memory management with weak self references
- iOS 12+ compatibility with fallback for deprecated APIs
- Comprehensive documentation about App Store compliance
Dart API Improvements #
- Made constructor private to prevent unnecessary instantiation
- Added @visibleForTestingannotation for better testability
- Made MethodChannel constfor performance
- Improved error handling with specific exception types
- Enhanced documentation with detailed examples and use cases
- Better null-safety handling
Testing & Quality #
- Replaced mockito with Flutter's built-in TestDefaultBinaryMessengerBinding
- No more code generation required for tests
- Added 6 comprehensive unit tests covering all scenarios
- Tests now verify both method calls and arguments
- All tests pass with zero warnings
Documentation #
- Completely rewrote README with clear examples and API reference
- Added migration guide from 1.x to 2.0
- Updated to use flutter_lintsfor better code quality
- Added platform support table
- Comprehensive inline code documentation
- Updated CLAUDE.md with modernization details
Example App Updates #
- Fixed AGP 8.x compatibility issues
- Updated Gradle wrapper to 8.4
- Added namespace declaration
- Added kotlinOptions configuration
- Example app now builds successfully on latest Flutter SDK
Dependencies #
- Updated to flutter_lints: ^5.0.0(replacedlints)
- Removed mockito,build_runner, andtestdependencies
- Cleaner dependency tree
1.1.2 #
- add iosForceExitparameter forexitAppmethod
1.1.1 #
- breaking: remove exit(0)for ios
1.1.0 #
- Fix kill ios process
- Add time wait for exit
1.0.5 #
- fix kill app in background when 1 sec
1.0.3 #
- fix docs
- android exit when 2000 msec
1.0.0 #
- Implement native android exit app
- Implement native ios exit app
- Add License