awareframework_gyroscope 0.0.5 copy "awareframework_gyroscope: ^0.0.5" to clipboard
awareframework_gyroscope: ^0.0.5 copied to clipboard

The Gyroscope Sensor allows us to retrieve data from the onboard gyroscopes.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:awareframework_gyroscope/awareframework_gyroscope.dart';
import 'package:awareframework_core/awareframework_core.dart';

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

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

class _MyAppState extends State<MyApp> {

  GyroscopeSensor sensor;
  GyroscopeSensorConfig config;

  @override
  void initState() {
    super.initState();

    config = GyroscopeSensorConfig()
      ..frequency = 100
      ..dbType = DatabaseType.DEFAULT
      ..debug = true;

    sensor = new GyroscopeSensor.init(config);
    sensor.start();
  }

  @override
  Widget build(BuildContext context) {


    return new MaterialApp(
      home: new Scaffold(
          appBar: new AppBar(
            title: const Text('Plugin Example App'),
          ),
          body: new GyroscopeCard(sensor: sensor,)
      ),
    );
  }
}
0
likes
20
pub points
0%
popularity

Publisher

unverified uploader

The Gyroscope Sensor allows us to retrieve data from the onboard gyroscopes.

Homepage

License

unknown (LICENSE)

Dependencies

awareframework_core, flutter

More

Packages that depend on awareframework_gyroscope