AutoStartFlutterPlatform class abstract
The interface that platform implementations of auto_start_flutter must
extend.
The top-level functions exported by package:auto_start_flutter delegate to
AutoStartFlutterPlatform.instance, so the whole plugin can be replaced
with a fake in tests or by a federated implementation.
Methods here are raw: they may throw PlatformException or
MissingPluginException. The public top-level functions translate those
into safe return values.
- Inheritance
-
- Object
- PlatformInterface
- AutoStartFlutterPlatform
- Implementers
Constructors
- AutoStartFlutterPlatform()
- Constructs a AutoStartFlutterPlatform.
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
-
cancelTask(
String taskId) → Future< bool?> - Cancels a previously scheduled task.
-
canScheduleExactAlarms(
) → Future< bool?> - Whether the app may schedule exact alarms.
-
completeBackgroundTask(
) → Future< void> - Tells the platform that a headless callback has finished so its engine can be released.
-
disableBatteryOptimization(
) → Future< void> - Prompts to exempt the app from battery optimization.
-
executeInBackground(
int callbackHandle) → Future< bool?> -
Runs
callbackHandlein a headless engine. -
getDeviceManufacturer(
) → Future< String?> - Returns the device manufacturer.
-
getLaunchArguments(
) → Future< Map?> - Returns the arguments the app was launched with.
-
getPlatformVersion(
) → Future< String?> - Returns a human readable platform version string.
-
getScheduledTaskIds(
) → Future< List< String> ?> - Returns ids of tasks that are scheduled and have not fired yet.
-
isAutoStartAvailable(
) → Future< bool?> - Whether an auto-start settings page exists on this device.
-
isBatteryOptimizationDisabled(
) → Future< bool?> - Whether the app is exempt from battery optimization.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openAppInfo(
) → Future< void> - Opens the app info page.
-
openAutoStartSettings(
) → Future< bool?> - Opens the auto-start settings page.
-
openBatteryOptimizationSettings(
) → Future< bool?> - Opens the system battery optimization list.
-
openCustomSetting(
String packageName, String activityName) → Future< bool?> - Opens an arbitrary activity.
-
openExactAlarmSettings(
) → Future< bool?> - Opens the exact alarm settings page.
-
registerBootCallback(
int callbackHandle) → Future< bool?> - Registers a callback handle to run on boot.
-
scheduleTask(
int timestampMillis, int callbackHandle, String taskId) → Future< bool?> -
Schedules a task at
timestampMillis(ms since epoch). -
startForegroundService(
String title, String content) → Future< bool?> - Starts the keep-alive foreground service.
-
stopForegroundService(
) → Future< bool?> - Stops the keep-alive foreground service.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ AutoStartFlutterPlatform
-
The default instance of AutoStartFlutterPlatform to use.
getter/setter pair