flutter_app_minimizer 0.0.2 flutter_app_minimizer: ^0.0.2 copied to clipboard
A new flutter plugin project.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:flutter_app_minimizer/flutter_app_minimizer.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: TextButton(
child: const Text('Minimize App'),
onPressed: () {
FlutterAppMinimizer.minimize();
},
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.blue),
foregroundColor: MaterialStateProperty.all(Colors.white),
),
),
),
),
);
}
}