Created
April 2, 2021 10:27
-
-
Save arulwastaken/759dbb62c215df75286cc482ff1ca8a6 to your computer and use it in GitHub Desktop.
Consume of location manager flutter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LocationManager(callback: (state) { | |
print("State ${state.toString()}"); | |
switch(state.state) { | |
case LocationEnum.ERROR: | |
print("error ${state.message}"); | |
break; | |
case LocationEnum.LOADING: | |
// TODO: Handle this case. | |
break; | |
case LocationEnum.REQUESTING_LOCATION_SERVICE: | |
// TODO: Handle this case. | |
break; | |
case LocationEnum.REQUESTING_LOCATION_PERMISSION: | |
// TODO: Handle this case. | |
break; | |
case LocationEnum.LOCATION_FOUND: | |
// TODO: Handle this case. | |
break; | |
} | |
}).requestLocation(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment