A Flutter plugin to access the accelerometer and gyroscope sensors.
To use this plugin, add sensors
as a dependency in your pubspec.yaml file.
import 'package:sensors/sensors.dart';
accelerometerEvents.listen((AccelerometerEvent event) {
// Do something with the event.
});
gyroscopeEvents.listen((GyroscopeEvent event) {
// Do something with the event.
});
example/README.md
Demonstrates how to use the sensors plugin.
For help getting started with Flutter, view our online documentation.
Add this to your package's pubspec.yaml file:
dependencies:
sensors: ^0.4.0+1
You can install packages from the command line:
with Flutter:
$ flutter packages get
Alternatively, your editor might support flutter packages get
.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:sensors/sensors.dart';
Version | Uploaded | Documentation | Archive |
---|---|---|---|
0.4.0+1 | Feb 8, 2019 |
|
|
0.4.0 | Jan 24, 2019 |
|
|
0.3.5 | Aug 21, 2018 |
|
|
0.3.4 | Jun 16, 2018 |
|
|
0.3.3 | Jun 1, 2018 |
|
|
0.3.2 | May 17, 2018 |
|
|
0.3.1 | Apr 16, 2018 |
|
|
0.3.0 | Mar 9, 2018 |
|
|
0.2.1 | Jan 11, 2018 |
|
|
0.2.0 | Dec 20, 2017 |
|
|
Popularity:
Describes how popular the package is relative to other packages.
[more]
|
90
|
Health:
Code health derived from static analysis.
[more]
|
100
|
Maintenance:
Reflects how tidy and up-to-date the package is.
[more]
|
100
|
Overall:
Weighted score of the above.
[more]
|
95
|
We analyzed this package on Feb 14, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
Package | Constraint | Resolved | Available |
---|---|---|---|
Direct dependencies | |||
Dart SDK | >=2.0.0-dev.28.0 <3.0.0 | ||
flutter | 0.0.0 | ||
Transitive dependencies | |||
collection | 1.14.11 | ||
meta | 1.1.6 | 1.1.7 | |
sky_engine | 0.0.99 | ||
typed_data | 1.1.6 | ||
vector_math | 2.0.8 | ||
Dev dependencies | |||
flutter_test | |||
test | ^1.3.0 |