daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Mar 11th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var currentLocation = <String, double>{};
  2.   var location = locator.Location();
  3.  
  4.   Future<ConditionsModel> fetchCurrentConditions() async {
  5.     try {
  6.       print('Entered');
  7.  
  8.       PermissionStatus permission = await PermissionHandler()
  9.         .checkPermissionStatus(PermissionGroup.location);
  10.       if(permission == PermissionStatus.granted) {
  11.         currentLocation = (await location.getLocation()) as Map<String, double>;
  12.       } else {
  13.         PermissionHandler().requestPermissions([PermissionGroup.location]);
  14.       }
  15.     ...
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top