awareframework_significantmotion 0.0.4

  • Readme
  • Changelog
  • Example
  • Installing
  • 35

Aware Significant Motion #

Build Status

This sensor provides significant device motions.

Install the plugin into project #

  1. Edit pubspec.yaml
  1. Import the package on your source code
import 'package:awareframework_significantmotion/awareframework_significantmotion.dart';
import 'package:awareframework_core/awareframework_core.dart';

Public functions #

Significant Motion Sensor #

  • start()
  • stop()
  • sync(bool force)
  • enable()
  • disable()
  • isEnable()
  • setLabel(String label)

Configuration Keys #


  • period: Float: Period to save data in minutes. (default = 1)
  • threshold: Double: If set, do not record consecutive points if change in value is less than the set value.
  • enabled: Boolean Sensor is enabled or not. (default = false)
  • debug: Boolean enable/disable logging to Logcat. (default = false)
  • label: String Label for the data. (default = "")
  • deviceId: String Id of the device that will be associated with the events and the sensor. (default = "")
  • dbEncryptionKey Encryption key for the database. (default = null)
  • dbType: Engine Which db engine to use for saving data. (default = 0) (0 = None, 1 = Room or Realm)
  • dbPath: String Path of the database. (default = "aware_accelerometer")
  • dbHost: String Host for syncing the database. (default = null)

Data Representations #

The data representations is different between Android and iOS. Following links provide the information.

Example usage #

// init config
var config = SignificantMotionSensorConfig()
  ..debug = true
  ..label = "label";

// init sensor
var sensor = new SignificantMotionSensor.init(config);

void method(){
    /// start 
    /// set observer
    sensor.onSignificantMotionStart.listen((dynamic event){
        // Your code here

    /// set observer
    sensor.onSignificantMotionEnd.listen((dynamic event){
        // Your code here
    /// stop
    /// sync
    // make a sensor care by the following code
    var card = new SignificantMotionCard(sensor:sensor);
    // NEXT: Add the card instance into a target Widget.

License #

Copyright (c) 2018 AWARE Mobile Context Instrumentation Middleware/Framework (

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at CENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

0.0.1 #

  • TODO: Describe initial release.


import 'package:flutter/material.dart';

import 'package:awareframework_significantmotion/awareframework_significantmotion.dart';

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

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

class _MyAppState extends State<MyApp> {

  SignificantMotionSensor sensor;
  SignificantMotionSensorConfig config;

  void initState() {

    config = SignificantMotionSensorConfig()
      ..debug = true;

    sensor = new SignificantMotionSensor.init(config);



  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
          appBar: new AppBar(
            title: const Text('Plugin Example App'),
          body: new SignificantMotionCard(sensor: sensor,)

Use this package as a library

1. Depend on it

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

  awareframework_significantmotion: ^0.0.4

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:awareframework_significantmotion/awareframework_significantmotion.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.9+1
  • Flutter: 1.17.3

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:awareframework_significantmotion/awareframework_significantmotion.dart]

Package does not support Flutter platform macos

Because of import path [package:awareframework_significantmotion/awareframework_significantmotion.dart]

Package does not support Flutter platform web

Because of import path [package:awareframework_significantmotion/awareframework_significantmotion.dart]

Package does not support Flutter platform windows

Because of import path [package:awareframework_significantmotion/awareframework_significantmotion.dart]

Package not compatible with SDK dart

because of import path [awareframework_significantmotion]

Health suggestions

Format lib/awareframework_significantmotion.dart.

Run flutter format to format lib/awareframework_significantmotion.dart.

Maintenance suggestions

Package is getting outdated. (-54.52 points)

The package was last published 80 weeks ago.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Homepage URL is insecure. (-5 points)

Update the homepage field and use a secure (https) URL.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
awareframework_core ^0.1.1 0.1.1
flutter 0.0.0
Transitive dependencies
charts_common 0.5.0 0.9.0
charts_flutter 0.5.0 0.9.0
collection 1.14.12 1.14.13
intl 0.15.8 0.16.1
logging 0.11.4
meta 1.1.8 1.2.0
path 1.7.0
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
test any