-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Sayegh7/feature/ios
🍏 Adding iOS support
- Loading branch information
Showing
13 changed files
with
155 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ | |
|
||
.packages | ||
.pub/ | ||
|
||
build/ | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
## 0.2.0 | ||
|
||
- Add iOS support. | ||
|
||
## 0.1.2 | ||
|
||
- Update Docs. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,42 @@ | ||
# move_to_background | ||
|
||
Flutter plugin for sending android application to background. Note that currently only android is supported. | ||
|
||
## Getting Started | ||
|
||
### Install it (pubspec.yaml) | ||
|
||
```yaml | ||
move_to_background: ^0.1.2 | ||
``` | ||
### Import it | ||
# Example App | ||
|
||
```dart | ||
import 'package:move_to_background/move_to_background.dart'; | ||
``` | ||
import 'package:flutter/material.dart'; | ||
### Use it | ||
|
||
```dart | ||
MoveToBackground.moveTaskToBack(); | ||
``` | ||
|
||
## Useful Scenario | ||
|
||
Use with WillPopScope to send your application to the background when the user attempts to exit the app. | ||
import 'package:move_to_background/move_to_background.dart'; | ||
```dart | ||
WillPopScope( | ||
child: MaterialApp(...), | ||
onWillPop: () async { | ||
MoveToBackground.moveTaskToBack(); | ||
return false; | ||
}, | ||
); | ||
void main() => runApp(MyApp()); | ||
class MyApp extends StatefulWidget { | ||
@override | ||
_MyAppState createState() => _MyAppState(); | ||
} | ||
class _MyAppState extends State<MyApp> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return WillPopScope( | ||
onWillPop: () async { | ||
MoveToBackground.moveTaskToBack(); | ||
return false; | ||
}, | ||
child: MaterialApp( | ||
home: Scaffold( | ||
floatingActionButton: FloatingActionButton( | ||
child: Icon(Icons.arrow_downward), | ||
onPressed: () { | ||
MoveToBackground.moveTaskToBack(); | ||
}, | ||
), | ||
appBar: AppBar( | ||
title: const Text('MoveToBackground Example'), | ||
), | ||
body: Center( | ||
child: Text('Press the floating action button'), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
PODS: | ||
- Flutter (1.0.0) | ||
- move_to_background (0.0.1): | ||
- Flutter | ||
|
||
DEPENDENCIES: | ||
- Flutter (from `.symlinks/flutter/ios`) | ||
- move_to_background (from `.symlinks/plugins/move_to_background/ios`) | ||
|
||
EXTERNAL SOURCES: | ||
Flutter: | ||
:path: ".symlinks/flutter/ios" | ||
move_to_background: | ||
:path: ".symlinks/plugins/move_to_background/ios" | ||
|
||
SPEC CHECKSUMS: | ||
Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a | ||
move_to_background: 39a5b79b26d577b0372cbe8a8c55e7aa9fcd3a2d | ||
|
||
PODFILE CHECKSUM: 7fb83752f59ead6285236625b82473f90b1cb932 | ||
|
||
COCOAPODS: 1.7.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters