flutter_privacy_screen 1.3.1 copy "flutter_privacy_screen: ^1.3.1" to clipboard
flutter_privacy_screen: ^1.3.1 copied to clipboard

A flutter plugin that blurs / blacks the screen in the task manager.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_privacy_screen/flutter_privacy_screen.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
            child: Column(
          children: <Widget>[
            TextButton(
              child: Text("Enable privacy screen"),
              onPressed: () async {
                await FlutterPrivacyScreen.enablePrivacyScreen();
              },
            ),
            TextButton(
              child: Text("Disable privacy screen"),
              onPressed: () async {
                await FlutterPrivacyScreen.disablePrivacyScreen();
              },
            )
          ],
        )),
      ),
    );
  }
}
3
likes
120
pub points
64%
popularity

Publisher

verified publisherappmire.be

A flutter plugin that blurs / blacks the screen in the task manager.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_privacy_screen