Sayegh7 / move_to_background

Flutter plugin for sending application to background

Home Page:https://pub.dev/packages/move_to_background

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Flutter plugin for sending application to background

https://pub.dev/packages/move_to_background

License:MIT License


Languages

Language:Java 29.5%Language:Ruby 28.2%Language:Dart 27.5%Language:Objective-C 14.9%