my_location_library21 0.0.5 my_location_library21: ^0.0.5 copied to clipboard
this is library is build for testing data collection prototype for current location
My Locaton
Features #
this Library provides the functionality to extract the current location and stream it to our endpoint. You can find the library at this URL: https://pub.dev/packages/my_location_library21.
Getting started #
Usage #
1,Install the package:
$ flutter pub add my_location_library21
2.Import the package in your Dart file:
import 'package:my_location_library21/my_location_library21.dart';
3,Call function and initialize
//call function
Future<void> _getCurrentLocation() async {
LocationData? locationData = await LocationService.getCurrentLocation();
print('Current Location Latitude: ${_currentLocation.latitude}');
print('Current Location Longitude: ${_currentLocation.longitude}');
}
// initialized the function
void initState() {
super.initState();
_getCurrentLocation();
}