Helper Functions
Utility functions
GeoFlowLive includes a set of helper functions designed to simplify common tasks and streamline your development process. These functions provide convenient utilities for working with location data and configuring the library. This section describes the available helper functions and their usage.
getDefaultSettings
📱🌐
getDefaultSettings
📱🌐This function returns a GeoFlowLiveSettingStruct object with the default configuration settings for location updates. You can use these default settings as a starting point and then customize them to suit your specific requirements.
Parameters: None
Return Value:
Data Type: GeoFlowLiveSettingStruct
Description: A GeoFlowLiveSettingStruct object populated with the default values for all the settings (accuracy, distance filter, intervals, etc.).
getLatLng
📱🌐
getLatLng
📱🌐This function extracts the latitude and longitude from a GeoFlowLivePositionStruct and returns them as a FlutterFlow LatLng object. This is useful for working with map widgets or other components that require a LatLng object.
Parameters:
Parameter
Data Type
Description
position
GeoFlowLivePositionStruct (nullable)
A
GeoFlowLivePositionStruct
object containing the location information.Return Value:
Data Type:
LatLng
Description: A
LatLng
object representing the latitude and longitude of the provided position. ReturnsLatLng
(0, 0) if the input position is null or if the latitude or longitude values are null.
Last updated