Skip to content
pubscout

flutter_exit_app

2.1.2, released 6 months ago by laoitdev.com

Platform-specific way to exit a Flutter app cleanly without calling exit(0).

WASM-ready
$ flutter pub add flutter_exit_app
Source repository

What it does

Provides a plugin method to exit the application properly on Android and iOS. On Android, it finishes the activity and removes it from the task list. On iOS, it gracefully suspends the app or optionally force-kills it.

AI-written summary of version 2.1.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to provide a clean app exit mechanism from within the UI
  • You want to avoid using Dart's exit(0) for a more graceful shutdown

Skip it when

  • You want to rely on the standard operating system behavior where users manage app closure
  • You are targeting iOS App Store compliance and plan to use force-exit mode without an enterprise or specific requirement

Strengths

  • Apple guideline compliant default behavior for iOS
  • Cleanly removes the app from the Android recent tasks list
  • Written in modern Kotlin and Swift with full null-safety

Weaknesses

  • Force-exit mode on iOS may cause the app to appear to crash and can lead to App Store review rejection
  • Programmatically exiting apps is generally discouraged by mobile platforms

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
0

Requires minimum iOS 13.0 and Android API 21.

import 'package:flutter_exit_app/flutter_exit_app.dart';

await FlutterExitApp.exitApp();

Alternatives

Packages that do the same job and could replace flutter_exit_app.