AppLimiterPlatform class abstract
The interface that implementations of app_limiter must implement.
Platform implementations should extend this class rather than implement it as app_limiter
does not consider newly added methods to be breaking changes. Extending this class
(using extends) ensures that the subclass will get the default implementation, while
platform implementations that implements this interface will be broken by newly added
AppLimiterPlatform methods.
- Inheritance
-
- Object
- PlatformInterface
- AppLimiterPlatform
- Implementers
Constructors
- AppLimiterPlatform()
- Constructs a AppLimiterPlatform.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
blockAllAndroidApps(
) → Future< void> - Blocks every Android app with a launcher icon, except essential ones.
-
blockAndroidApp(
{required String packageName}) → Future< void> - Blocks a specific Android app package.
-
blockAndroidApps(
) → Future< void> - Blocks every Android app with a launcher icon, except essential ones.
-
blockAndUnblockIOSApp(
) → Future< void> - Handles blocking and unblocking operations for iOS apps.
-
blockIOSApps(
) → Future< void> - Shields the apps and categories previously chosen in the iOS picker.
-
configureIosSchedule(
Map< String, dynamic> schedule) → Future<void> - Updates iOS schedule without reopening app/category picker.
-
getBlockedAndroidApps(
) → Future< List< String> > - Returns the package names that are individually blocked on Android.
-
getEventStream(
) → Stream< Map< String, dynamic> > - Event stream for permission, schedule, and selection state updates.
-
getIOSAuthorizationStatus(
) → Future< String> - Returns the iOS Screen Time authorization status.
-
getPlatformCapabilities(
) → Future< Map< String, dynamic> > - Returns platform capabilities and currently active plugin features.
-
getPlatformVersion(
) → Future< String?> - Gets the platform version.
-
isAndroidBlockingActive(
) → Future< bool> - Returns true if Android blocking is currently active.
-
isAndroidEnterpriseModeEnabled(
) → Future< bool> - Returns true if Android enterprise mode is currently active.
-
isAndroidPermissionAllowed(
) → Future< bool> - Checks if required Android permissions are granted.
-
isIOSAppsBlocked(
) → Future< bool> - Returns true if any iOS app or category is currently shielded.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestAndroidPermission(
) → Future< void> - Requests necessary Android permissions.
-
requestIosPermission(
) → Future< bool> - Requests necessary permissions on iOS.
-
selectAndConfigureIosAppRestrictions(
{Map< String, dynamic> ? schedule}) → Future<void> - Opens iOS app/category picker and applies current restrictions.
-
setAndroidEnterpriseModeEnabled(
{required bool enabled}) → Future< void> - Enables or disables optional Android enterprise mode.
-
showIOSAppPicker(
) → Future< bool> - Shows the iOS app/category picker without applying any restriction.
-
toString(
) → String -
A string representation of this object.
inherited
-
unblockAllAndroidApps(
) → Future< void> - Removes every Android block and stops the blocking service.
-
unblockAndroidApp(
{required String packageName}) → Future< void> - Unblocks a specific Android app package.
-
unblockAndroidApps(
) → Future< void> - Removes every Android block.
-
unblockIOSApps(
) → Future< void> - Removes every shield applied by this plugin on iOS.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ AppLimiterPlatform
-
The default instance of AppLimiterPlatform to use.
getter/setter pair