at_location_flutter library
A library to provide location sharing functionality used by the at_protocol packages and apps
Classes
- Anchor
-
AnchorPos<
T> - AnimatedTile
- AssetTileProvider
- AtLocationFlutterPlugin
- A class defined to show markers based on current location of mentioned atsigns.
- CachedNetworkTileProvider
- CircleLayer
- CircleLayerOptions
- CircleLayerWidget
- CircleMarker
- CirclePainter
-
Coords<
T extends num> - Crs
- An abstract representation of a Coordinate Reference System.
- CrsSimple
-
CustomPoint<
T extends num> - CustomTileProvider
- DistanceCalculate
- Earth
- Epsg3857
- The most common CRS used for rendering maps.
- Epsg4326
- A common CRS among GIS enthusiasts. Uses simple Equirectangular projection.
- FileTileProvider
- FitBoundsOptions
- FlutterMap
- Renders a map composed of a list of layers powered by LayerOptions.
- GroupLayer
- GroupLayerOptions
- LayerOptions that describe a layer composed by multiple built-in layers.
- GroupLayerWidget
- HomeScreen
- HybridModel
- Model containing the displayName, image, eta, marker associated with the latLng.
- LatLngBounds
- LayerOptions
- Common type between all LayerOptions.
- Level
- LocationDataModel
- LocationInfo
- LocationModal
- LocationNotificationModel
- Model containing all the information needed for location sharing.
- LocationSharingFor
- MapController
- Controller to programmatically interact with FlutterMap.
- MapOptions
- Allows you to provide your map's starting properties for zoom, rotation and center. Alternatively you can provide bounds instead of center. If both, center and bounds are provided, bounds will take preference over center. Zoom, pan boundary and interactivity constraints can be specified here too.
- MapPlugin
- MapPosition
- Position's type for PositionCallback.
- Marker
- MarkerLayer
- MarkerLayerOptions
- MarkerLayerWidget
- NetworkTileProvider
- NonCachingNetworkTileProvider
- OverlayImage
- OverlayImageLayer
- OverlayImageLayerOptions
- OverlayImageLayerWidget
- Polygon
- PolygonLayer
- PolygonLayerOptions
- PolygonLayerWidget
- PolygonPainter
- Polyline
- PolylineLayer
- PolylineLayerOptions
- PolylineLayerWidget
- PolylinePainter
- Proj4Crs
- Custom CRS
- Projection
- RequestLocationSheet
- SearchLocationService
- SendLocationNotification
- masterSwitchState will control whether location is sent to any user
- SphericalMercator
- Tile
- TileLayer
- TileLayerOptions
- Describes the needed properties to create a tile-based layer. A tile is an image bound to a specific geographical position.
- TileLayerWidget
- TileProvider
- Transformation
- WMSTileLayerOptions
Functions
-
buildMarker(
HybridModel user, {bool singleMarker = false, Widget? marker}) → Marker -
Builds a marker for the given
user
-
compareAtSign(
String atsign1, String atsign2) → bool -
returns true if
atsign1
&atsign2
are same -
deleteAllLocationData(
) → void - deletes all the location notifications of the logged in atsign being shared with any atsign
-
deleteLocationData(
LocationNotificationModel locationNotificationModel) → Future< bool> -
deletes the location notification of the logged in atsign being shared with
locationNotificationModel
.receiver -
getAllNotification(
) → Stream - returns a Stream of 'KeyLocationModel' having all the shared and request location keys.
-
getAtKey(
String regexKey) → AtKey -
returns the 'AtKey' of the
regexKey
-
getCurrentPosition(
) → Future< LatLng?> -
Returns current
LatLng
of the device without checking for permissions. Use this function when it is known that location permission is enabled. -
getMyLocation(
) → Future< LatLng?> -
Returns current
LatLng
of the device. -
getMyLocationInfo(
LocationNotificationModel _event) → LocationInfo? - will return details of my booleans for this LocationNotificationModel
-
getOtherMemberLocationInfo(
String _id, String _atsign) → LocationInfo? - will return details of others booleans for this LocationNotificationModel
-
initializeLocationService(
required String mapKey, required String apiKey, bool showDialogBox = false, String rootDomain = 'root.atsign.org', Function? getAtValue, dynamic streamAlternative(List< KeyLocationModel> )?, bool isEventInUse = false}) → Future<void> - Function to initialise the package. Should be mandatorily called before accessing package functionalities.
-
isLocationServiceEnabled(
) → Future< bool> - checks if location service is enabled.
-
sendRequestLocationNotification(
String atsign) → Future< bool?> -
sends a request location notification to the
atsign
. before calling thisatsign
should be checked if valid or not. -
sends a share location notification to the
atsign
, with a 'ttl' ofminutes
. before calling thisatsign
should be checked if valid or not. -
showLocation(
Key? key, MapController? mapController, {LatLng? location, List< LatLng> ? locationList, Widget? locationListMarker, bool moveMap = true}) → Widget - A widget defined to show zero or one or a list of geo co-ordinates with custom marker.
-
trimAtsignsFromKey(
String key) → String - input => '@25antwilling:sharelocation-1637156978786327@26juststay' or 'sharelocation-1637156978786327' output => sharelocation-1637156978786327
Typedefs
- ErrorTileCallBack = void Function(Tile? tile, dynamic error)
- LongPressCallback = void Function(LatLng? point)
- PositionCallback = void Function(MapPosition position, bool hasGesture)
- TapCallback = void Function(LatLng? point)
-
TileReady
= void Function(Coords<
double> ? coords, dynamic error, Tile tile)