gyroscope_widget 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 61

Flutter Gyroscope Widget! #

Hey guys!

This library will allow you to move a little bit your widgets when you rotate your mobile phone.

Getting Start #

add in your pubspec.yaml

dependencies:
  gyroscope_widget: ^1.0.0

in your dart file, you can use like that.

Widget build(BuildContext context) {
	return Scaffold(
		body: Container(
			width: double.infinity,
			height: double.infinity,
			child: GyroscopeWidget(
				scaleMargin: 0.2,
				child: Image.network('https://picsum.photos/250?image=10',
					height: double.infinity,
					width: double.infinity,
					fit: BoxFit.fill,
				),
			),
		),
	);
}

Example #

Documentation #

GitHub Documentation

[0.0.1] - TODO: Add release date. #

[1.0.0] - release the package. #

  • TODO: Describe initial release.

example/lib/main.dart

import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Gyroscope Widget Demo',
      home: DemoPage(),
    );
  }
}

class DemoPage extends StatefulWidget {

  @override
  _DemoPageState createState() => _DemoPageState();
}

class _DemoPageState extends State<DemoPage> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        width: double.infinity,
        height: double.infinity,
        child: GyroscopeWidget(
          scaleMargin: 0.2,
          child: Image.network('https://picsum.photos/250?image=10',
            height: double.infinity,
            width: double.infinity,
            fit: BoxFit.fill,
          ),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  gyroscope_widget: ^1.0.0

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

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

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:gyroscope_widget/gyroscope_widget.dart, package:sensors/sensors.dart] that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because of import path [package:gyroscope_widget/gyroscope_widget.dart, package:sensors/sensors.dart] that declares support for platforms: android, ios

Package does not support Flutter platform web

Because of import path [package:gyroscope_widget/gyroscope_widget.dart, package:sensors/sensors.dart] that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because of import path [package:gyroscope_widget/gyroscope_widget.dart, package:sensors/sensors.dart] that declares support for platforms: android, ios

Package not compatible with SDK dart

because of import path [gyroscope_widget] that is in a package requiring null.

Health suggestions

Format lib/gyroscope_widget.dart.

Run flutter format to format lib/gyroscope_widget.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
sensors ^0.4.1+8 0.4.2+2
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.1
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