aeyrium_sensor 1.0.7

  • Readme
  • Changelog
  • Example
  • Installing
  • 82

Flutter Aeyrium Sensor Plugin #

Aeyrium Sensor Plugin

A Flutter sensor plugin which provide easy access to the Pitch and Roll on Android and iOS devices. It was made using TYPE_ROTATION_VECTOR sensor on Android and DeviceMotion on iOS.

Import #

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

dependencies:
  aeyrium_sensor: ^1.0.7

Usage #

import 'package:aeyrium_sensor/aeyrium_sensor.dart';

AeyriumSensor.sensorEvents.listen((SensorEvent event) {
      //do something with the event , values expressed in radians
      print("Pitch ${event.pitch} and Roll ${event.roll}")
      
    });

Real Demo #

We developed this plugin to use it on our Attitude indicator screen. Aeyrium Sensor

Issues #

Please file any issues, bugs or feature request as an issue on our GitHub page.

Author #

This Aeyrium Sensor plugin for Flutter is developed by Aeyrium Inc

[1.0.5 - 1.0.7] - 12/10/2018 #

  • Fixed roll value calculation for iOS.

[1.0.4] - 10/02/2018 #

  • Values are expressed in radians instead of degrees.
  • Use AeyriumSensor.sensorEvents instead of AeyriumSensor().sensorEvents

[1.0.3] - 10/02/2018 #

  • Pitch value was fixed when rotate the device on iOS.

[1.0.0 - 1.0.2] - 10/01/2018 #

  • Get the pitch and roll from your device.

example/lib/main.dart

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:aeyrium_sensor/aeyrium_sensor.dart';

void main() => runApp(new MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => new _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _data = "";

  StreamSubscription<dynamic> _streamSubscriptions;

  @override
  void initState() {
    _streamSubscriptions = AeyriumSensor.sensorEvents.listen((event) {
      setState(() {
        _data = "Pitch ${event.pitch} , Roll ${event.roll}";
      });
    });
    super.initState();
  }

  @override
  void dispose() {
    if (_streamSubscriptions != null) {
      _streamSubscriptions.cancel();
    }
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Padding(
          padding: const EdgeInsets.all(15.0),
          child: new Center(
            child: new Text('Device : $_data'),
          ),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  aeyrium_sensor: ^1.0.7

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:aeyrium_sensor/aeyrium_sensor.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
77
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
68
Overall:
Weighted score of the above. [more]
82
Learn more about scoring.

We analyzed this package on Jul 12, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.15
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform Linux

Because:

  • package:aeyrium_sensor/aeyrium_sensor.dart that declares support for platforms: Android, iOS

Package does not support Flutter platform Web

Because:

  • package:aeyrium_sensor/aeyrium_sensor.dart that declares support for platforms: Android, iOS

Package does not support Flutter platform Windows

Because:

  • package:aeyrium_sensor/aeyrium_sensor.dart that declares support for platforms: Android, iOS

Package does not support Flutter platform macOS

Because:

  • package:aeyrium_sensor/aeyrium_sensor.dart that declares support for platforms: Android, iOS

Package not compatible with SDK dart

Because:

  • aeyrium_sensor that is a package requiring null.

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://aeyrium.com/ was unreachable.

Package is getting outdated. (-9.86 points)

The package was last published 57 weeks ago.

Update README.md. (-2 points)

1 image link is insecure (e.g. http://img.youtube.com/vi/IIoa9uNka_0/0.jpg), use https URLs instead.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test
test ^1.3.0