flutter_app_minimizer_plus 1.0.2
flutter_app_minimizer_plus: ^1.0.2 copied to clipboard
A Flutter plugin to minimize the app and move it to the background on Android.
Flutter App Minimizer Plus #
A simple and lightweight Flutter plugin to minimize your Android app and move it to the background with just one line of code! Perfect for apps that need to programmatically minimize themselves.
Features #
- Minimize App: Programmatically minimize the app and move it to the background.
- Lightweight: No unnecessary dependencies or bloat.
- Easy to Use: Just call a single method to minimize the app.
Installation #
Add the following to your pubspec.yaml
file:
dependencies:
flutter_app_minimizer_plus: ^1.0.0
Then, run:
flutter pub get
Usage #
Import the Package #
import 'package:flutter_app_minimizer_plus/flutter_app_minimizer_plus.dart';
Minimize the App #
Call the minimizeApp
method to minimize the app and move it to the background:
FlutterAppMinimizerPlus.minimizeApp();
Example #
Here’s a complete example:
import 'package:flutter/material.dart';
import 'package:flutter_app_minimizer_plus/flutter_app_minimizer_plus.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Flutter App Minimizer Plus'),
),
body: Center(
child: ElevatedButton(
onPressed: () {
FlutterAppMinimizerPlus.minimizeApp();
},
child: Text('Minimize App'),
),
),
),
);
}
}
Platform Support #
Platform | Support |
---|---|
Android | ✅ |
iOS | ❌ |
Contributing #
Contributions are welcome! If you find a bug or want to suggest a feature, please open an issue or submit a pull request.
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature
). - Open a pull request.
License #
This project is licensed under the MIT License. See the LICENSE file for details.
Support #
If you find this plugin useful, consider giving it a ⭐️ on GitHub or buying me a coffee ☕️.