exitApp static method

Future<bool?> exitApp({
  1. bool iosForceExit = false,
})

exit app

return true if exit app success, otherwise false iosForceExit if true ios force exit default false. No affect in android

Implementation

static Future<bool?> exitApp({bool iosForceExit = false}) async {
  try {
    final String? res = await channel.invokeMethod<String>(
      ChannelName.exitApp,
      {"killIosProcess": iosForceExit},
    );
    return res == "Done";
  } catch (_) {
    return false;
  }
}