Flutter plugin for sending mobile applications to background. Supports iOS and Android.
✅ Compatible with Flutter 3.29.3 ✅ Supports Android API 16+ (targetSdk 34) ✅ Uses Flutter Embedding v2 ✅ AndroidX compatible
dependencies:
move_to_background: ^1.0.3import 'package:move_to_background/move_to_background.dart';MoveToBackground.moveTaskToBack();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;
},
);- Flutter 3.0 or higher
- Dart 2.17.0 or higher
- Android API level 16 (Android 4.1) or higher
- Target SDK 34 (Android 14) for Google Play Store compliance
- AndroidX support
- iOS 9.0 or higher
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.
See CHANGELOG.md for a detailed list of changes.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.