Flutter plugin for sending mobile applications to background. Supports iOS and Android.
move_to_background: <latest>
import '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;
},
);
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.