Last active
December 12, 2024 11:59
-
-
Save martinoyovo/4e6fc8cbd6ce9e1386432e5fc4aed305 to your computer and use it in GitHub Desktop.
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
| class _ShowDeviceLocation extends State<ShowDeviceLocation> with WidgetsBindingObserver { | |
| ... | |
| @override | |
| void initState() { | |
| // Add the app lifecycle observer. | |
| WidgetsBinding.instance.addObserver(this); | |
| if (_locationPermission != AppPermissionStatus.granted) { | |
| initLocationPermissions(); | |
| } | |
| super.initState(); | |
| } | |
| ... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment