用户可借助该项目在 Flutter 应用中便捷获取设备运动数据,实现对安卓和 iOS 加速度计、陀螺仪、磁力计及方向传感器的访问,支持传感器数据监听功能。【此简介由AI生成】
Access rate limit exceeded. Please log in to continue.
motion_sensors
Flutter plugin for accessing the Android and iOS accelerometer, gyroscope, magnetometer and orientation sensors.
Getting Started
To use this plugin, add motion_sensors as a dependency in your pubspec.yaml
file.
dependencies:
motion_sensors: ^0.1.0
Import to your project.
import 'package:motion_sensors/motion_sensors.dart';
motionSensors.magnetometer.listen((MagnetometerEvent event) {
print(event);
});
Screenshot

Ohos Documentation
Introduction
用户可借助该项目在 Flutter 应用中便捷获取设备运动数据,实现对安卓和 iOS 加速度计、陀螺仪、磁力计及方向传感器的访问,支持传感器数据监听功能。【此简介由AI生成】
Customize your domain