screenshot_detect

This is an iOS-only plugin for detecting when user takes a screenshot through UIApplication.userDidTakeScreenshotNotification. It was heavily inspired by this package.

Getting Started

  • Import the package

    import 'package:screenshot_detect/screenshot_detect.dart';
    
  • Create a ScreenshotDetect instance

     final ScreenshotDetect screenshotDetect = ScreenshotDetect();
    
  • Add an observer

     screenshotDetect.addListener(() {
              print('Taken screenshot')
          exampleFunction();
        });
    
  • Dispose when done

      @override
      void dispose() {
        screenshotDetect.dispose();
        super.dispose();
      }
    

Author

  • glebosotov - gleb.osotov@gmail.com

Libraries

screenshot_detect