gps_data_reset 2.0.0 copy "gps_data_reset: ^2.0.0" to clipboard
gps_data_reset: ^2.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: TextButton(
            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();
              }
            },
          ),
        ),
      ),
    );
  }
}
2
likes
130
pub points
42%
popularity

Publisher

verified publisherfuadarradhi.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