AFSWAN class
Static helper class that provides methods to start and stop a foreground service.
On any platform other than Android, all methods in this class are no-ops and do nothing, so it is safe to call them without a platform check.
AFSWAN is an abbreviation for android_foreground_service_with_awesome_notifications.
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
startForeground(
{required PushNotification notification, int startType = AndroidServiceConstants.startSticky, int? foregroundServiceType}) → Future< void> -
Starts the foreground service with the given
notification
, whichs content must not benull
. -
stopForeground(
) → Future< void> - Stops a foreground service.