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

This sensor module allows us to access the rotation rate of the device

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:awareframework_rotation/awareframework_rotation.dart';

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

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

class _MyAppState extends State<MyApp> {

  RotationSensor sensor;
  RotationSensorConfig config;

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

    config = RotationSensorConfig()
      ..frequency = 100
      ..debug = true;

    sensor = new RotationSensor.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 RotationCard(sensor: sensor, height: 200.0,)
      ),
    );
  }
}
0
likes
20
pub points
0%
popularity

Publisher

unverified uploader

This sensor module allows us to access the rotation rate of the device

Homepage

License

unknown (LICENSE)

Dependencies

awareframework_core, flutter

More

Packages that depend on awareframework_rotation