LocationPlatform class

The interface that implementations of location must extend.

Inheritance
  • Object
  • PlatformInterface
  • LocationPlatform
Implementers

Constructors

LocationPlatform()
Constructs a new LocationPlatform.

Properties

hashCode int
The hash code for this object.
no setterinherited
onLocationChanged Stream<LocationData>
Returns a stream of LocationData objects. The frequency and accuracy of this stream can be changed with changeSettings
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

changeNotificationOptions({String? channelName, String? title, String? iconName, String? subtitle, String? description, Color? color, bool? onTapBringToFront}) Future<AndroidNotificationData?>
Change options of sticky background notification on Android.
changeSettings({LocationAccuracy? accuracy, int? interval, double? distanceFilter}) Future<bool>
Change settings of the location request.
enableBackgroundMode({bool? enable}) Future<bool>
Enables or disables service in the background mode.
getLocation() Future<LocationData>
Gets the current location of the user.
hasPermission() Future<PermissionStatus>
Checks if the app has permission to access location.
isBackgroundModeEnabled() Future<bool>
Checks if service is enabled in the background mode.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestPermission() Future<PermissionStatus>
Requests permission to access location.
requestService() Future<bool>
Request the activation of the location service.
serviceEnabled() Future<bool>
Checks if the location service is enabled.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance LocationPlatform
The default instance of LocationPlatform to use.
getter/setter pair