Is it possible to create a flutter app to lock screen/ Turn on and off the screen in 2022? - flutter

flutter native dependencies
I need a way to access native dependencies

you can use the flutter_screen_lock, which provides the ability to lock the screen on ios and android. Biometric authentication can be used in addition to passcode.

Related

Detect when there is a biometric change in local_auth Flutter

Using loca_auth in Flutter, is it possible to detect when a fingerprint is added/deleted to the device?
You can't detect if a new fingerprint is added or deleted because that would violate the App and PlayStore Rules.
For some reason, this goes out of scope of "local_auth", which is why you can check the change of biometrics only on your own or using third-party packages.
I found did_change_authlocal package - it can check the change of biometrics on Android and iOS.

How can I access device information without using packages in Flutter?

How can I access device information without using packages in Flutter? How can I get the information of the device where the app is installed in my Flutter app?
First, you'd be better off using packages. But if you really want/need to do it, you'd have to write platform-specific code code in the native language of the targeted platform (ie. Swift or Objective-C for iOS/Mac, Kotlin or Java for Android, etc), then use so-called platform channels to pass messages between your app and the platform-specific code.
If you'd like to get details about the device, on iOS you'd use UIDevice, on Android you'd typically want Build.
This can only be done through Method Channel

It is possible to make a non-malicious keylogger in Flutter for IOS and Android?

it is possible to make a non-malicious keylogger in Flutter that works in IOS and Android?
The app will be for kids supervision and will be visible in the notification area.
Keyloger needs access privileges through the device's operating system,but Flutter apps cannot have such access privileges.So it is no possible to make keyloggers with Flutter.
you can use https://pub.dev/packages/flutter_secure_keyboard to prevent malicious keyloggers.

Flutter: Launch my other application from flutter application and get some data back

Using flutter to launch other applications on both the platform (Android/iOS). I know we can use url_laucher to launch applications like Gmail or Google map.
Can it also be used for launching my own application?
If "YES", is it possible to get some data back from my other application to flutter application?
If "NO" then is there any other way to do this. My goal is to get the data (like a simple string) back from my other app.
NOTE: Constraint is that I have to use flutter Widgets or packages and not touch the native directories.
Yes, you can use url_launcher to launch your own application provided your application has appropriate url schemes defined.
No, you cannot get back any data by launching an application with url_launcher
Is there a way to achieve this only using flutter widgets and existing plugins?
Yes, only on android. There seems to be a flutter_share plugin that allows you to share data to other apps and receive data shared by other apps.
Hope that helps!

Flutter device administrator permission

I'm trying to build an application that will lock the screen on a timer in Flutter. I'm wondering how to grant android device administrator permissions to an application in flutter.
I've found this but it's not really helpful i feel for flutter.
https://developer.android.com/guide/topics/admin/device-admin#java
Does anyone have any suggestions?
There is currently no platform-agnostic Flutter implementation for locking a device screen programmatically. The Android specific page you were looking at is what you need to add admin permissions to the manifest file and implement your screen locking functionality.
You can add Android-specific Java or Kotlin code in a Flutter project as stated here: https://flutter.io/docs/development/platform-integration/platform-channels