flutter_screenshot_switcher 2.2.0 copy "flutter_screenshot_switcher: ^2.2.0" to clipboard
flutter_screenshot_switcher: ^2.2.0 copied to clipboard

A flutter plugin that allows to enable / disable screenshots.

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:flutter_screenshot_switcher/flutter_screenshot_switcher.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:
        Column(children: <Widget>[
            TextButton(child:Text("Disable screenshots"), onPressed: () async {
              await FlutterScreenshotSwitcher.disableScreenshots();
            },),
            TextButton(child:Text("Enable screenshots"), onPressed: () async {
              await FlutterScreenshotSwitcher.enableScreenshots();
            },)]
        ),
      ),
    );
  }
}
9
likes
0
pub points
70%
popularity

Publisher

verified publisherappmire.be

A flutter plugin that allows to enable &#x2F; disable screenshots.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_screenshot_switcher