app_blocker library
Cross-platform app blocking plugin for Flutter.
Block applications on Android (custom block screen) and iOS (Screen Time Shield). Supports scheduling, focus profiles, and real-time blocking events.
Classes
- AppBlocker
- Cross-platform app blocking plugin for Flutter.
- AppBlockerPlatform
- The interface that platform-specific implementations must implement.
- AppInfo
- Information about an installed application.
- BlockerCapabilities
- Describes the capabilities available on the current platform.
- BlockEvent
- Represents an event that occurred during app blocking.
- BlockProfile
- A named group of blocked apps with associated schedules.
- BlockSchedule
- Represents a time-based schedule for blocking apps.
- BlockScreenConfig
- Configuration for the Android block screen shown when a blocked app is opened.
Enums
- BlockerPermissionStatus
- The status of required permissions for app blocking.
- BlockEventType
- The type of a block event.
- BlockStatus
- The current blocking status of an application.
Exceptions / Errors
- AppBlockerException
- Base exception for all app_blocker errors.
- InvalidConfigException
- Thrown when an invalid configuration is provided.
- PermissionDeniedException
- Thrown when a required permission is denied.
- PermissionRestrictedException
- Thrown when permissions are restricted by the system or parental controls.
- PlatformUnsupportedException
- Thrown when the current platform does not support the requested operation.
- ProfileNotFoundException
- Thrown when a referenced profile is not found.
- ScheduleConflictException
- Thrown when a schedule conflicts with an existing one.
- Thrown when the blocking service is unavailable.