PackageTrack
Sign in Get early access

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 2026
2026
Release Pre-release

Releases

latest 13
  1. 1.1.0 23 Mar 2026
    Release notes
    • 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

    Open source →
    Release notes

    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
    • wrapWithRestart widget: New TerminateRestart.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 on FlutterEngine)
      • UI-only restart now recreates FlutterViewController with the same engine (safe, no crash)
      • Sends resetToRoot to Dart side to trigger full widget tree rebuild via wrapWithRestart
      • Replaced deprecated keyWindow/windows APIs with connectedScenes for iOS 13+
      • Fixed keychain clearing query that prevented proper deletion
      • Added specific error codes and messages for better debugging
    • Fixed web double-tap issue: location.replace(sameUrl) doesn't trigger a reload in most browsers — now uses location.reload() for both modes with scheduleMicrotask for immediate response
    • Fixed duplicate class definitions: Removed conflicting TerminateRestartOptions, RestartMode, and TerminateRestart class definitions from terminate_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 restartApp to use platform interface pattern instead of direct MethodChannel
    • Updated iOS minimum deployment target from 10.0 to 12.0
    • Added 7 working unit tests (previously 100% commented out)
    • Added gc method handler in iOS plugin
    • Added kIsWeb guard for internal method channel setup
    • Cleaned up unused Android imports (AlarmManager, PendingIntent, Process, exitProcess)
    • Updated example app to use wrapWithRestart and upgraded google_fonts to 6.3.3 for Flutter 3.38+ web compatibility
    Open source →
  2. 1.0.11 21 May 2025

    Nothing published for this version

  3. 1.0.10 07 Apr 2025
    Release notes
    • 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
    Open source →
  4. 1.0.9 08 Feb 2025
    Release notes
    • Documentation improvements:
      • Improved README.md formatting and organization
      • Removed emoji icons for better readability
      • Made code examples more concise
      • Fixed markdown formatting issues
    Open source →
  5. 1.0.8 08 Feb 2025
    Release notes
    • Documentation improvements:
      • Streamlined Getting Started section
      • Removed redundant sections
      • Made code examples more concise
      • Added feature comparison table
      • Improved overall readability
    Open source →
  6. 1.0.7 07 Feb 2025
    Release notes
    • 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
    Open source →
  7. 1.0.6 07 Feb 2025
    Release notes
    • Code maintenance and improvements
    • Updated dependencies to latest compatible versions
    • Enhanced code documentation
    • Minor bug fixes and performance improvements
    Open source →
  8. 1.0.5 06 Feb 2025
    Release notes
    • 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
    Open source →
  9. 1.0.4 05 Feb 2025
    Release notes
    • Added TerminateRestart.instance singleton 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 makeRestartActivityTask for more reliable app restart
      • Improved activity recreation and state management
      • Better handling of process termination
    • 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
    Open source →
  10. 1.0.3 05 Feb 2025
    Release notes

    🚀 New Features

    • Improved UI-only restart functionality:
      • Maintains WebSocket and HTTP connections
      • Properly resets to root state
      • Smooth transition animations
      • Added initialize method with onRootReset callback
    • 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
    Open source →
  11. 1.0.2 05 Feb 2025

    Nothing published for this version

  12. 1.0.1 05 Feb 2025

    Nothing published for this version

  13. 1.0.0 05 Feb 2025
    Release notes
    • 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
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive