List of permissions in flutter to take screenshot from background - flutter

How could take a screenshot in the background in the flutter, what permission needs to take from the user?
While app running in the background it takes a screenshot of the foreground app or screen with time?

check out the library on pub dev - https://pub.dev/packages/screenshot#-installing-tab-

Related

Flutter overlay over other apps

I want to build a Flutter App that can show information in a modalBottomSheet, but outside of the App.
The App should run in the background and when I want it to show something, it should show a modalBottomSheet over the curently used App. It doesn't matter if the user is in a App or just the Homescreen, important is that the App runs from the background and can overlay other Apps.
You could use flutter_overlay_window. It can display your flutter app over other apps on the screen

Is there a way to display a specific Flutter page when screen is locked?

please is there a way to display or open a Flutter page when screen is locked in Flutter like how WhatsApp displays incoming call page when screen is locked? I used Wake up plugin but can't display the page on screen locked. Please I need a guide to do that. Thanks in advance.
What you are looking for is called a time sensitive notification with a full screen notification. What it does is that if the screen is locked it opens the activity linked to the pending intent used for full screen notification. When the phone is unlocked, it shows a heads up notification instead. You must have seen this behavior with all kinds of telephony apps and alarm apps.
A flutter app runs inside a single activity, so if you mark that as the activity to show during the locked state, the app will show. But it will act similar to how the app would when you launch it from start. Also the behavior is unpredictable as it is behind a wakelock. So a better option would be to move it to a separate activity and do the needful. Example of how to implement full screen notifications.
https://medium.com/android-news/full-screen-intent-notifications-android-85ea2f5b5dc1

Can I hide Flutter app contents when the app is in Background?

I'm developing an app that works with sensitive information.
One of the requirements is that when a user puts the app in background the content that the app is currently displaying has to be hidden, so if another person navigate through the apps in background he can't see the last screen where the user was.
Any ideas on how to do that?
I tried to show an overlay when the app moves to AppLifecycleState.paused, but it doesn't work for me, the app prints a message if I want but it can't update the UI.
Edit
Shameless plug: i did a library for doing just that as I also needed it:
https://pub.dev/packages/secure_application
Answear
Build is not called after paused, at least on Android.
For Android I used a flutter_windowmanager package (modified to still be able to build on IOS):
https://github.com/neckaros/flutter_windowmanager
When my app need securing I add the flag secure:
FlutterWindowManager.addFlags(FlutterWindowManager.FLAG_SECURE)
And my app is now a black screen in the app switcher.
You should still hide content your way for when the user get back to the app.
Otherwise you can go native:
https://medium.com/#mehmetf_71205/securing-flutter-apps-ada13e806a69

How can I fix the delay of flutter app during launch?

When I run flutter app it delays for few seconds shows just white screen and then the main page is shown. How can i fix it
There is an entry in the docs about the launch screen.
https://flutter.io/docs/development/ui/assets-and-images#updating-the-launch-screen
Basically you can provide an image to be shown while flutter loads. The framework is not ready at that point though, so this is done on the platform side.

Showing black screen when coming to foreground in ios

I am working on an app having facebook integration.
App is working fine for first few times.
if i open the app from background after 2-3 hrs its showing black screen when it comes to foreground.
I am giving permission for offline access.
Any help would be thankful...
put a picture named "Default.png" in your project's resource folder may help you.