gps 0.1.1 copy "gps: ^0.1.1" to clipboard
gps: ^0.1.1 copied to clipboard

discontinued

Getting location data in the simplest way, and just getting it. Google service is not used in Android.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:gps/gps.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  GpsLatlng latlng;

  @override
  void initState() {
    super.initState();
    initGps();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('gps is :$latlng'),
        ),
      ),
    );
  }

  void initGps() async {
    var gps = await Gps.currentGps();
    this.latlng = gps;
    setState(() {});
  }
}
11
likes
35
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

Getting location data in the simplest way, and just getting it. Google service is not used in Android.

Repository (GitHub)

License

MIT (license)

Dependencies

flutter

More

Packages that depend on gps

Packages that implement gps