terminate_restart
A Flutter plugin for app termination and restart with data clearing options.
1.1.0
70K downloads/mo
#1278 most downloaded on pub.dev
sleem2012/terminate_restart
What this package is like to depend on
Last release 5 months ago
23 Mar 2026
Release timing varies
gaps range from 6 weeks to 10 months
Most releases are documented
notes for 10 of 13 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
13 releases · first in 2025
1 release in the last 12 months
see the full history below
Release timeline
13 releases · Feb 2025 to Mar 2026Releases
latest 13-
1.1.023 Mar 2026Release notes
Open source →- Fix iOS crash (Issue #9): Remove crash-prone engine recreation with
non-existent destroyContext(), simplify UI restart to use method channel
communication, replace deprecated keyWindow/windows APIs with connectedScenes - Add web platform support (PR #10 by @dario-valles): page reload with
browser storage clearing (localStorage, sessionStorage, cookies, IndexedDB) - Fix duplicate TerminateRestartOptions/TerminateRestart class definitions
in terminate_restart_base.dart that caused compile conflicts - Migrate restartApp to platform interface pattern instead of direct MethodChannel
- Fix podspec version mismatch (was 1.0.9, now synced to 1.1.0)
- Update iOS minimum deployment target from 10.0 to 12.0
- Add working unit tests (previously 100% commented out)
- Add gc method handler and kIsWeb guard in iOS/Dart plugins
Closes #9
Release notes
Open source →New Features
- Web platform support: Full restart functionality for web browsers (PR #10 by @dario-valles)
- Page reload for both terminate and UI-only restart modes
- Browser storage clearing: localStorage, sessionStorage, cookies, IndexedDB, Cache API
- Configurable data preservation matching native API
wrapWithRestartwidget: NewTerminateRestart.wrapWithRestart()method that wraps your app to enable proper UI-only restart (terminate: false) with full widget tree rebuild
Bug Fixes
- Fixed iOS crash (Issue #9): Resolved crash on iOS when performing UI-only restart
- Removed crash-prone new engine creation approach (
destroyContext()did not exist onFlutterEngine) - UI-only restart now recreates
FlutterViewControllerwith the same engine (safe, no crash) - Sends
resetToRootto Dart side to trigger full widget tree rebuild viawrapWithRestart - Replaced deprecated
keyWindow/windowsAPIs withconnectedScenesfor iOS 13+ - Fixed keychain clearing query that prevented proper deletion
- Added specific error codes and messages for better debugging
- Removed crash-prone new engine creation approach (
- Fixed web double-tap issue:
location.replace(sameUrl)doesn't trigger a reload in most browsers — now useslocation.reload()for both modes withscheduleMicrotaskfor immediate response - Fixed duplicate class definitions: Removed conflicting
TerminateRestartOptions,RestartMode, andTerminateRestartclass definitions fromterminate_restart_base.dart - Fixed podspec version mismatch: Synced podspec version with pubspec
- Fixed Android dead code: Removed unreachable engine recreation code that ran on a finishing Activity
Improvements
- Migrated
restartAppto use platform interface pattern instead of directMethodChannel - Updated iOS minimum deployment target from 10.0 to 12.0
- Added 7 working unit tests (previously 100% commented out)
- Added
gcmethod handler in iOS plugin - Added
kIsWebguard for internal method channel setup - Cleaned up unused Android imports (
AlarmManager,PendingIntent,Process,exitProcess) - Updated example app to use
wrapWithRestartand upgradedgoogle_fontsto 6.3.3 for Flutter 3.38+ web compatibility
- Fix iOS crash (Issue #9): Remove crash-prone engine recreation with
-
1.0.1121 May 2025Nothing published for this version
-
1.0.1007 Apr 2025Release notes
Open source →- Fixed Swift compiler error in Xcode 16.2 with Flutter 3.29.0:
- Modified engine property access to handle non-optional FlutterEngine type
- Added documentation for required iOS configuration:
- Detailed URL scheme configuration in Info.plist for iOS restart functionality
- Improved compatibility with latest Flutter versions
- Fixed Swift compiler error in Xcode 16.2 with Flutter 3.29.0:
-
1.0.908 Feb 2025Release notes
Open source →- Documentation improvements:
- Improved README.md formatting and organization
- Removed emoji icons for better readability
- Made code examples more concise
- Fixed markdown formatting issues
- Documentation improvements:
-
1.0.808 Feb 2025Release notes
Open source →- Documentation improvements:
- Streamlined Getting Started section
- Removed redundant sections
- Made code examples more concise
- Added feature comparison table
- Improved overall readability
- Documentation improvements:
-
1.0.707 Feb 2025Release notes
Open source →- Updated deprecated platform message handling to use
channelBuffers.push - Enhanced documentation:
- Added Quick Start guide for faster onboarding
- Added iOS App Store compliance section
- Added comprehensive usage table with examples
- Added confirmation dialog examples
- Improved code formatting and organization
- Updated README with clearer installation and usage instructions
- Fixed code examples and method signatures
- Updated deprecated platform message handling to use
-
1.0.607 Feb 2025Release notes
Open source →- Code maintenance and improvements
- Updated dependencies to latest compatible versions
- Enhanced code documentation
- Minor bug fixes and performance improvements
-
1.0.506 Feb 2025Release notes
Open source →- Improved code formatting and organization
- Enhanced error handling with specific PlatformException handling
- Updated method channel naming for better consistency
- Added comprehensive API documentation
- Fixed UI restart functionality
- Added back navigation handling for Android
- Improved static analysis compliance
-
1.0.405 Feb 2025Release notes
Open source →-
Added
TerminateRestart.instancesingleton pattern for better state management -
Enhanced initialization with comprehensive state reset examples
-
Added support for different state management solutions (GetX, Provider, Bloc)
-
Improved documentation with real-world examples
-
Updated all code examples to use the new instance pattern
-
Fixed UI-only restart implementation
-
Added proper error handling for timeouts and platform-specific errors
-
Enhanced Android restart functionality:
- Using
makeRestartActivityTaskfor more reliable app restart - Improved activity recreation and state management
- Better handling of process termination
- Using
-
Improved iOS implementation:
- Better URL scheme handling for app restart
- Enhanced view controller management
- Proper state preservation during restarts
-
General improvements:
- More reliable UI-only restart on both platforms
- Better error handling and logging
- Code cleanup and documentation updates
-
-
1.0.305 Feb 2025Release notes
Open source →🚀 New Features
- Improved UI-only restart functionality:
- Maintains WebSocket and HTTP connections
- Properly resets to root state
- Smooth transition animations
- Added
initializemethod withonRootResetcallback
- Better platform-specific implementations:
- iOS: Uses proper view controller transitions
- Android: Maintains Flutter engine while resetting activity
🛠️ Improvements
- Added comprehensive documentation
- Added comparison of restart modes
- Added best practices guide
- Improved error handling
- Added example code for common use cases
🐛 Bug Fixes
- Fixed UI-only restart not properly resetting to root
- Fixed Android activity recreation issues
- Fixed iOS view controller transition glitches
- Improved UI-only restart functionality:
-
1.0.205 Feb 2025Nothing published for this version
-
1.0.105 Feb 2025Nothing published for this version
-
1.0.005 Feb 2025Release notes
Open source →- Initial release with the following features:
- Support for both Android and iOS platforms
- Two restart modes: UI-only and full process termination
- Optional data clearing during restart
- Configurable data preservation options (keychain, user defaults)
- Confirmation dialog support with customizable messages
- Comprehensive example app demonstrating all features
- Fixed data clearing functionality in both UI and terminate modes
- Added extensive error handling and logging
- Added type-safe API with null safety support
Features
- Full app restart functionality
- UI-only refresh option
- Data clearing with selective preservation
- Extensive customization options
- Cross-platform support (Android & iOS)
- Comprehensive logging
- Type-safe implementation
Android Implementation
- Proper process termination
- Activity/task management
- Intent flag handling
- State preservation options
iOS Implementation
- Clean process termination
- State restoration
- Data management
- Background task handling
Documentation
- Comprehensive README
- API documentation
- Usage examples
- Common issues & solutions
- Initial release with the following features: