guoxf / flutter_compass

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flutter_compass

pub package

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.

Usage

To use this plugin, add flutter_compass as a dependency in your pubspec.yaml file. For example:

dependencies:
  flutter_compass: '^0.4.3'

iOS

Make sure to add keys with appropriate descriptions to the Info.plist file.

  • NSLocationWhenInUseUsageDescription
  • NSLocationAlwaysAndWhenInUseUsageDescription

๐Ÿ“ Reference example code

Android

Make sure to add permissions to the app/src/main/AndroidManifest.xml file.

  • android.permission.INTERNET
  • android.permission.ACCESS_COARSE_LOCATIO
  • android.permission.ACCESS_FINE_LOCATION

๐Ÿ“ Reference example code

Recommended support plugins

๐Ÿ“ Reference example code

About

License:MIT License


Languages

Language:Dart 34.9%Language:Ruby 26.5%Language:Java 24.6%Language:Swift 11.5%Language:Objective-C 2.5%