ExtraSettings/move_to_background
用于将应用程序发送到后台的 Flutter 插件
- Stars
- 28
- Forks
- 84
- 最近推送(UTC)
- 2024年2月7日
- 项目状态
- 未归档
语言JavaRubyDartObjective-C
技术话题
使用的依赖
依赖清单 2 项
- flutter
{"sdk":"flutter"} - flutter_test开发依赖
{"sdk":"flutter"}
原始 README
以下为英文项目原文快照,最新内容请访问 GitHub。
展开 / 收起项目 README
move_to_background
Flutter plugin for sending mobile applications to background. Supports iOS and Android.
Getting Started
Install it (pubspec.yaml)
move_to_background: <latest>
Import it
import 'package:move_to_background/move_to_background.dart';
Use it
MoveToBackground.moveTaskToBack();
Useful Scenario
Use with WillPopScope to send your application to the background when the user attempts to exit the app.
WillPopScope(
child: MaterialApp(...),
onWillPop: () async {
MoveToBackground.moveTaskToBack();
return false;
},
);
Note about using it for iOS
Quitting your application or sending it to the background programmatically is a violation of the iOS Human Interface Guidelines, which usually doesn't bode well for getting through the review process. Keep that in mind.