Your application need to have admin privileges to control such conditions.
Scroll through this link for more detailed explanation.
Go through this link for Device administration feature This is irrespective of Cross Platform apps or Native Apps.
In Flutter, even if you try creating a plugin which can communicate to native layer, still the restrictions remain the same.
Moreover this ability gives you much more access than usual applications. Which is considered as dangerous.
Few API's are deprecated considering the security aspects. Details are given below.
With the release of Android 9.0, the following policies are marked as
deprecated when invoked by a device admin, but the APIs otherwise
continue to function.
USES_POLICY_DISABLE_CAMERA
USES_POLICY_DISABLE_KEYGUARD_FEATURES
USES_POLICY_EXPIRE_PASSWORD
USES_POLICY_LIMIT_PASSWORD