Overview
A Flutter plugin that enables platform-specific app termination, allowing users to exit the app gracefully without using Dart's exit(0). It leverages native platform methods to ensure compatibility and proper behavior across Android and iOS. The plugin is designed for developers seeking a clean way to close the app in response to user actions, such as pressing a back button or selecting 'Exit' from a menu. It avoids direct process termination, promoting better app lifecycle management.
Use cases
- Exiting the app on back press
- Implementing an exit confirmation dialog
- Closing the app from a settings menu
- Graceful shutdown in kiosk mode
- Handling app exit in full-screen apps
Key features
- Platform-specific exit behavior
- No need to call exit(0)
- Supports Android and iOS
- Simple API integration
- Respects app lifecycle
Suitable for
- Developers building kiosk or fullscreen apps
- Apps requiring user confirmation before exit
- Projects needing native exit behavior
- Mobile apps with custom navigation flows
- Apps targeting both Android and iOS
Considerations
- Does not work in debug mode on some platforms
- May require additional handling for background tasks
- Not suitable for apps relying on exit(0) for testing
- Limited control over exit timing
- Requires proper permission handling on Android