1

Is there any way to detect if screen is getting captured for my app in flutter? I want to turn my screen black if any app/system is recoding screen while my app is active. Is it possible in flutter?

Aman gautam
  • 822
  • 2
  • 9
  • 20
  • 1
    Does this answer your question? [How to prevent screen-record in an flutter-based application on iOS and android?](https://stackoverflow.com/questions/57432233/how-to-prevent-screen-record-in-an-flutter-based-application-on-ios-and-android) –  Mar 16 '21 at 04:31
  • Solution suggested by @AminSamani should work. – Kishan Dhankecha Mar 16 '21 at 04:36
  • What I want is, User is free to take screenshot but cannot record screen. As per comment by @AminSamani , both will be blocked. – Aman gautam Mar 16 '21 at 16:30

1 Answers1

0

try this plugin flutter_windowmanager to prevent screen shot and video record

in main file :

  disableCapure() async {
     await FlutterWindowManager.addFlags(FlutterWindowManager.FLAG_SECURE);  
  }

then call that method after runApp

  void main(){
    runApp(...);
    disableCapure();
  }

although for ios you have to know native code maybe it not work pretty for ios