Skip to content

Instantly share code, notes, and snippets.

@timbergus
Last active May 31, 2019 15:16
Show Gist options
  • Select an option

  • Save timbergus/97af9e4210a21365f1fc2e467fe94e51 to your computer and use it in GitHub Desktop.

Select an option

Save timbergus/97af9e4210a21365f1fc2e467fe94e51 to your computer and use it in GitHub Desktop.
import 'package:geolocator/geolocator.dart';
class _MyHomePageState extends State<MyHomePage> {
[...]
Future<Position> getPosition() async {
Position position = await Geolocator()
.getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
return position;
}
[...]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment