rotation_detector 1.0.2

  • Example
  • Installing
  • Versions
  • new50

Rotation Detector Widget

This is a widget that gives rotation behavior to a circular child widget


    width: 300.0,
    height: 300.0,
    child: <place your cicular child here>,


Add a more extense example

[0.0.1] - TODO: Add release date.

  • TODO: Describe initial release.


import 'package:flutter/material.dart';
import 'package:flutter_circular_chart/flutter_circular_chart.dart';
import 'package:rotation_detector/rotation_detector.dart';

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter Demo',
      theme: new ThemeData(
        // This is the theme of your application.
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or press Run > Flutter Hot Reload in IntelliJ). Notice that the
        // counter didn't reset back to zero; the application is not restarted.
      home: new MyHomePage(title: 'Flutter Demo Home Page'),

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  _MyHomePageState createState() => new _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {
  final GlobalKey<AnimatedCircularChartState> _chartKey =
      new GlobalKey<AnimatedCircularChartState>();
  List<CircularStackEntry> data = <CircularStackEntry>[
    new CircularStackEntry(
        new CircularSegmentEntry(500.0,[200], rankKey: 'Q1'),
        new CircularSegmentEntry(1000.0,[200], rankKey: 'Q2'),
        new CircularSegmentEntry(2000.0,[200], rankKey: 'Q3'),
        new CircularSegmentEntry(1000.0, Colors.yellow[200], rankKey: 'Q4'),
      rankKey: 'Quarterly Profits',

  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      body: Center(
        child: Material(
          shape: CircleBorder(),
          elevation: 2.0,
          child: RotationDetector(
            width: 300.0,
            height: 300.0,
            child: AnimatedCircularChart(
              key: _chartKey,
              size: const Size(300.0, 300.0),
              holeRadius: 300.0,
              initialChartData: data,
              chartType: CircularChartType.Pie,

Use this package as a library

1. Depend on it

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

  rotation_detector: "^1.0.2"

2. Install it

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.

3. Import it

Now in your Dart code, you can use:

      import 'package:rotation_detector/rotation_detector.dart';
Version Uploaded Documentation Archive
1.0.2 May 4, 2018 Go to the documentation of rotation_detector 1.0.2 Download rotation_detector 1.0.2 archive
1.0.0 May 4, 2018 Go to the documentation of rotation_detector 1.0.0 Download rotation_detector 1.0.0 archive


We analyzed this package on May 22, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.54.0
  • pana: 0.11.1
  • Flutter: 0.4.4


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
100 / 100
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.


Package Constraint Resolved Available
Direct dependencies
Dart SDK <=2.0.0-edge.c080951d45e79cd25df98036c4be835b284a269c
flutter 0.0.0
Transitive dependencies
collection 1.14.6 1.14.9
meta 1.1.5
sky_engine 0.0.99
typed_data 1.1.5
vector_math 2.0.6 2.0.7
Dev dependencies