flutter_exit_app
A Flutter plugin that provides a platform-specific way to exit the app without calling exit(0) in Dart code.
2.1.2
17K downloads/mo
#2326 most downloaded on pub.dev
xang555/flutter_exit_app
What this package is like to depend on
Last release 2 months ago
03 Jun 2026
Release timing varies
gaps range from 6 weeks to 1.5 years
Most releases are documented
notes for 12 of 15 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
15 releases · first in 2022
4 releases in the last 12 months
see the full history below
Release timeline
15 releases · Feb 2022 to Jun 2026Releases
latest 15-
2.1.203 Jun 2026Release notes
Open source →- Fixed Swift Package Manager compatibility by migrating the iOS plugin implementation to 100% Swift (removing the mixed language Swift/Objective-C target structure which is not supported by SPM).
-
2.1.129 Mar 2026 -
2.1.029 Mar 2026Release notes
Open source →Breaking Changes
- BREAKING: Minimum iOS version increased from 12.0 to 13.0
iOS Changes
- SPM Support: Added Swift Package Manager support while maintaining CocoaPods compatibility
- Restructured iOS sources to
ios/flutter_exit_app/Sources/flutter_exit_app/ - Updated podspec to support dual CocoaPods and SPM integration
Android Upgrades
- Updated Kotlin from 1.9.24 to 2.0.21
- Updated Android Gradle Plugin from 8.1.0 to 8.7.3
- Updated Gradle from 8.4 to 8.9
- Updated Java compatibility from 1.8 to 17
- Updated kotlin-stdlib-jdk8 to kotlin-stdlib
Example App Updates
- Updated for new Flutter iOS architecture with
FlutterImplicitEngineDelegate - Added
UIApplicationSceneManifestconfiguration for modern iOS scene management - Updated minimum deployment target to iOS 13.0
Notes
- Projects using CocoaPods will continue to work without changes
- New projects can opt to use Swift Package Manager
Release notes
Open source →Swift Package Manager support and dependency upgrades
Breaking Changes
- BREAKING: Minimum iOS version increased from 12.0 to 13.0
iOS Changes
- SPM Support: Added Swift Package Manager support while maintaining CocoaPods compatibility
- Restructured iOS sources to
ios/flutter_exit_app/Sources/flutter_exit_app/ - Updated podspec to support dual CocoaPods and SPM integration
Android Upgrades
- Updated Kotlin from 1.9.24 to 2.0.21
- Updated Android Gradle Plugin from 8.1.0 to 8.7.3
- Updated Gradle from 8.4 to 8.9
- Updated Java compatibility from 1.8 to 17
- Updated kotlin-stdlib-jdk8 to kotlin-stdlib
Example App Updates
- Updated for new Flutter iOS architecture with
FlutterImplicitEngineDelegate - Added
UIApplicationSceneManifestconfiguration for modern iOS scene management - Updated minimum deployment target to iOS 13.0
Notes
- Projects using CocoaPods will continue to work without changes
- New projects can opt to use Swift Package Manager
-
2.0.023 Oct 2025Release notes
Open source →🚀 flutter_exit_app v2.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
- Migrated from Java to Kotlin for better performance and maintainability
- Updated Android Gradle Plugin to 8.1.0
- Updated Gradle to 8.4
- Improved error handling and lifecycle management
🍎 iOS Improvements
- Refactored to follow Apple best practices
- Proper app lifecycle notification handling
- Better memory management
- App Store compliance improvements
📦 Dart API Improvements
- Better testability and performance
- Improved error handling
- Enhanced documentation
✅ Testing & Quality
- Modern testing with Flutter's built-in utilities
- 6 comprehensive unit tests
- Zero warnings
📥 Installation
dependencies: flutter_exit_app: ^2.0.0
Release notes
Open source →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.406 Aug 2024 -
1.1.327 Jun 2024Release notes
Open source →Release Notes
- Update version
- Add Test case
- Update example
- Update native code
- Fix an issue #1
Release notes
Open source →- Update version
- Add Test case
- Update example
- Update native code
- Fix an issue #1
-
1.1.206 Jan 2023 -
1.1.105 Jan 2023 -
1.1.005 Jan 2023 -
1.0.503 Mar 2022 -
1.0.401 Mar 2022Nothing published for this version
-
1.0.301 Mar 2022 -
1.0.201 Mar 2022Nothing published for this version
-
1.0.128 Feb 2022Nothing published for this version
-
1.0.028 Feb 2022Release notes
Open source →- Implement native android exit app
- Implement native ios exit app
- Add License