Location#
flet_onesignal.location.OneSignalLocation
#
OneSignal Location namespace.
Provides methods for managing location sharing with OneSignal.
Functions#
get_permission
async
#
Check if location permission is currently granted.
Returns:
| Type | Description |
|---|---|
bool
|
True if permission is granted, False otherwise. |
is_shared
async
#
Check if location is currently being shared with OneSignal.
Returns:
| Type | Description |
|---|---|
bool
|
True if location is shared, False otherwise. |
request_permission
async
#
Request permission to access location.
Returns:
| Type | Description |
|---|---|
bool
|
True if permission was granted, False otherwise. |
set_shared
async
#
Set whether location data should be shared with OneSignal.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
shared
|
bool
|
True to share location, False to stop sharing. |
required |