Skip to main content

exit

Description​

Exits the application.

Parameters​

None

Returns​

void

Notes​

  • On the web it does nothing (no-op).
  • On non-web platforms it calls exit(code) from dart:io to terminate the process immediately.
  • iOS App Store guidelines discourage force-quitting an app programmatically, so check your policy before using this in a production build.

Example​

// Exit the app when the user confirms in the exit dialog
$app.exit();