geopoint_location 0.4.0 copy "geopoint_location: ^0.4.0" to clipboard
geopoint_location: ^0.4.0 copied to clipboard

Handle real time location data. Get structured Geopoint data from Geolocator

Geopoint location #

pub package

Get Geopoint data from Geolocator Position updates

Simple position #

import 'package:geopoint/geopoint.dart';
import 'package:geopoint_location/geopoint_location.dart';

GeoPoint geoPoint = await geoPointFromLocation(
   name: "Current position", withAddress: true);

Positions stream #

import 'package:geopoint/geopoint.dart';
import 'package:geopoint_location/geopoint_location.dart';

StreamSubscription<GeoPoint> _sub;
final _loc = LocationStream().initGeoPointStream();
_sub = _loc.geoPointStream.listen((pos) => print("Position update $pos"));
//_sub.cancel();

Convert a geolocator Position to a GeoPoint #

import 'package:geopoint/geopoint.dart';
import 'package:geopoint_location/geopoint_location.dart';

final position = await Geolocator().getCurrentPosition();
final GeoPoint geoPoint = await geoPointFromPosition(
   position: position,
   name: "Current position");

Same but sync, address not available:

final GeoPoint geoPoint = geoPointFromPositionSync(
   position: position,
   name: "Current position");
4
likes
40
pub points
35%
popularity

Publisher

unverified uploader

Handle real time location data. Get structured Geopoint data from Geolocator

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

cupertino_icons, extra_pedantic, flutter, geolocator, geopoint, pedantic, slugify2

More

Packages that depend on geopoint_location