A Flutter compass. The heading varies from 0-360, 0 being north.
Note:
Android Only: null is returned as direction on android when no sensor available.
To use this plugin, add flutter_compass as a dependency in your pubspec.yaml file. For example:
dependencies:
flutter_compass: '^0.7.0'Make sure to add keys with appropriate descriptions to the Info.plist file.
NSLocationWhenInUseUsageDescriptionNSLocationAlwaysAndWhenInUseUsageDescription
Make sure to add permissions to the app/src/main/AndroidManifest.xml file.
android.permission.INTERNETandroid.permission.ACCESS_COARSE_LOCATIONandroid.permission.ACCESS_FINE_LOCATION
- Flutter Permission handler Plugin: Easy to request and check permissions in a cross-platform (iOS, Android) API.