gps_data_reset 1.0.0
gps_data_reset: ^1.0.0 copied to clipboard

Flutter plugin to send extra command for reset and re-download GPS data.

example/lib/main.dart

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

void main() {
  runApp(MyApp());
}

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

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: FlatButton(
            child: Text('Reset GPS Data'),
            onPressed: () async {
              GPSResetStatus status = await GPSDataReset.resetAndDownload();
              if (status == GPSResetStatus.SUCCESS) {
                print("Reset succes");
              } else if (status == GPSResetStatus.DENIED) {
                print("User rejected permission");
              } else if (status == GPSResetStatus.PERMANENTLY_DENIED) {
                GPSDataReset.openAppSettings();
              }
            },
          ),
        ),
      ),
    );
  }
}
1
likes
80
pub points
0%
popularity

Publisher

fuadarradhi.com

Flutter plugin to send extra command for reset and re-download GPS data.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, permission_handler

More

Packages that depend on gps_data_reset