Flutter 插件提供了退出应用程序的最佳方式,无需调用`exit(0)`Dart 代码。
文件 最后提交记录 最后更新时间 docs: update README and modernize Android/iOS implementation with Kotlin/Swift
10 个月前 feat: add OpenHarmony platform support - Add FlutterExitAppPlugin.ets for OpenHarmony platform - Implement exit app functionality using terminateSelf() - Add README.OpenHarmony_CN.md and README.OpenHarmony.md - Update pubspec.yaml with ohos platform configuration - Add example ohos project files 🤖 Generated with CodeMate
6 个月前 refactor: improve iOS app exit handling with proper lifecycle events and cleanup
10 个月前 docs: update README and modernize Android/iOS implementation with Kotlin/Swift
10 个月前 feat: add OpenHarmony platform support - Add FlutterExitAppPlugin.ets for OpenHarmony platform - Implement exit app functionality using terminateSelf() - Add README.OpenHarmony_CN.md and README.OpenHarmony.md - Update pubspec.yaml with ohos platform configuration - Add example ohos project files 🤖 Generated with CodeMate
6 个月前 docs: update README and modernize Android/iOS implementation with Kotlin/Swift
10 个月前 docs: update README and modernize Android/iOS implementation with Kotlin/Swift
10 个月前 #add: android exit app implementation #add: ios exit app implementation #add: readme and update plugin version
4 年前 chore: update changelog for v2.0.0 with breaking changes and major improvements
10 个月前 #fix: license
4 年前 docs: replace gitcode references with atomgit Replace gitcode.com and gitcode mentions with atomgit across docs and configs. Co-Authored-By: AtomCode <jianguo@nutpi.net> Signed-off-by: 坚果 <jianguo@nutpi.net>
1 天前 docs: replace gitcode references with atomgit Replace gitcode.com and gitcode mentions with atomgit across docs and configs. Co-Authored-By: AtomCode <jianguo@nutpi.net> Signed-off-by: 坚果 <jianguo@nutpi.net>
1 天前 feat: add smooth exit animations for iOS with scale and fade effects
10 个月前 docs: update README and modernize Android/iOS implementation with Kotlin/Swift
10 个月前 feat: add OpenHarmony platform support - Add FlutterExitAppPlugin.ets for OpenHarmony platform - Implement exit app functionality using terminateSelf() - Add README.OpenHarmony_CN.md and README.OpenHarmony.md - Update pubspec.yaml with ohos platform configuration - Add example ohos project files 🤖 Generated with CodeMate
6 个月前
flutter_exit_app
本项目基于 flutter_exit_app 开发。
1. 安装与使用
1.1 安装方式
进入到工程目录并在 pubspec.yaml 中添加以下依赖:
pubspec.yaml
...
dependencies:
flutter_exit_app:
git:
url: "git@atomgit.com:oh-flutter/flutter_exit_app.git"
path: "."
...
执行命令
flutter pub get
1.2 使用案例
使用案例详见 example
2. 约束与限制
2.1 兼容性
在以下版本中已测试通过
Flutter: 3.7.12-ohos-1.1.3; SDK: 5.0.0(12); IDE: DevEco Studio: 6.0.1.251; ROM: 6.0.0.115 SP16;
Flutter: 3.22.1-ohos-1.0.3; SDK: 5.0.0(12); IDE: DevEco Studio: 6.0.1.251; ROM: 6.0.0.115 SP16;
Flutter: 3.27.5-ohos-1.0.1; SDK: 5.0.0(12); IDE: DevEco Studio: 6.0.1.251; ROM: 6.0.0.115 SP16;
Flutter: 3.35.8-ohos-0.0.2; SDK: 5.1.0(18); IDE: DevEco Studio: 6.1.0; ROM: 6.1.0.28(SP12);
3. API
方法
说明
FlutterExitApp.exitApp({bool iosForceExit = false})
退出应用。在 OpenHarmony 平台上调用 terminateSelf() 关闭应用。
FlutterExitApp.platformVersion
获取平台版本信息。
4. 遗留问题
无
5. 开源协议
本项目基于 The MIT License ,请自由地享受和参与开源。
Flutter 插件提供了退出应用程序的最佳方式,无需调用`exit(0)`Dart 代码。
定制我的领域 举报项目