FLUTTER ECOSYSTEM

ExtraSettings/move_to_background

Flutter-Plugin zum Senden der Anwendung in den Hintergrund

Projektcover von in den Hintergrund verschieben
Stars
28
Forks
84
Letzter Push (UTC)
07.02.2024
Projektstatus
Aktiv
ExtraSettings GitHub avatar
SprachenJavaRubyDartObjective-C

Technische Themen

Verwendete Abhängigkeiten

Abhängigkeiten 2 Einträge
  • flutter{"sdk":"flutter"}
  • flutter_testEntwicklung{"sdk":"flutter"}

Original-README

Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.

Projekt-README ein-/ausklappen

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.