Flutter: How to prevent Screenshots and Screen Recording in the Flutter App iOS & Android

Alex Melnyk
LITSLINK
Published in
3 min readMar 20, 2023

--

Not many apps required screenshots and/or screen recordings protection but you will face a lot of articles on how to do that for Android and not so much for iOS in case, you’ll need that in your app.

Android SDK provides an official API to prevent screenshotting here but Apple sees no sense in this and doesn’t have API to make it possible, on the left hand that is true, and anytime you can take another phone with a camera and take a picture or record video of the app, at least this makes harder the process of capturing content when you need some protection in the app.

This feature could be implemented only by native code in both platforms Android/iOS so, let's get started.

In case you need just a code, please visit the repository.

Android

As I said previously we have an official API to prevent screenshots/screen recordings in Android applications, just take a look at how easy is it:

--

--