requestPermission method
Future<bool>
requestPermission({
- UsageInterval interval = UsageInterval.daily,
- ScreenTimePermissionType permissionType = ScreenTimePermissionType.appUsage,
Returns a RequestPermissionModel with the following keys:
status
: The current authorization statustrue
is requestedfalse
: failed to request.error
: Error message if failed to request. appUsage: Request permission to access app usage data. accessibilitySettings: Opens the system accessibility settings screen. This allows users to enable the app monitoring service
Returns true
if the settings screen was opened successfully,
false
otherwise
Implementation
Future<bool> requestPermission({
UsageInterval interval = UsageInterval.daily,
ScreenTimePermissionType permissionType = ScreenTimePermissionType.appUsage,
}) =>
throw UnimplementedError('requestPermission() has not been implemented.');