location_helper_juni1289 0.0.2 copy "location_helper_juni1289: ^0.0.2" to clipboard
location_helper_juni1289: ^0.0.2 copied to clipboard

A Flutter package to easily access the Location params on the go, without the need of writing extra lines of code

A Flutter package to easily access the Location params on the go, without the need of writing extra lines of code

Features #

A flutter package that can:

  • One liner -> LocationHelperUtil.instance.getCurrentLocationData();
  • Check for Permissions, so you don't have to write any code to check for the Location Permissions
  • Check for GPS, so you don't need to turn it on if required for getting the Location
  • Returns a helper model, so you will get all information about your location data as well as permission results
  • Easy to manage, One Liner you only have to write one line of code to get the location
  • This package depends on https://pub.dev/packages/location & https://pub.dev/packages/permission_handler :)

Additional information #

  • Easy to use and manage
  • Helper model gives all the information
  • One liner, no need to write any extra lines of code

Basic Setup #

    LocationHelperUtil.instance.getCurrentLocationData().then((LocationDataModel? locationDataModel) {
      if (locationDataModel != null && locationDataModel.locationData != null && locationDataModel.locationResultsEnum == LocationResultsEnums.permissionGranted) {
        setState(() {
          location = "Lat: ${locationDataModel.locationData!.latitude} lon:${locationDataModel.locationData!.longitude}";
        });
      } else {
        setState(() {
          location = "Something went wrong, check LocationDataModel instance for details :)";
        });
      }
    });

Signature #

    Future<LocationDataModel?> getCurrentLocationData()
5
likes
140
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package to easily access the Location params on the go, without the need of writing extra lines of code

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, location, permission_handler

More

Packages that depend on location_helper_juni1289