sprung 1.1.0+11

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 80

sprung #

Sprung is an easy-to-consume Curve that uses real physics equations to drive your animations.

Easy to consume #

AnimatedContainer(
  curve: Sprung(),
  /// ...
),

Sprung() also supports three damping curves, Damped.under, Damped.critically, and Damped.over.

AnimatedContainer(
  curve: Sprung(
    damped: Damped.under
  ),
  /// ...
),

Note: Sprung is critically damped by default.

Based on Physics #

Using Newton's Second Law of Motion, Hooke's Law, and velocity based damping, we implement the following equation in three finite cases.

m times x dot dot equals negative k times parenthesis x minus 1 close parenthesis minus c times x dot

Believable motion #

demo of under, critically, and over damped Flutter curves

Reliable accuracy #

Sprung exceeds Flutter specifications for curves by guaranteeing an error less than 1e-6. This amounts to a 0.0019px jitter at the beginning or end of a 1920px move.

Prior Art #

https://medium.com/@dtinth/spring-animation-in-css-2039de6e1a03

1.1.0+11 #

  • Add test cases and streamline tests for Next.

1.1.0+10 #

  • Added preview API to next.dart.

1.0.0+9 #

  • Decrease test epsilon (error) to 1e-6.

1.0.0+8 #

  • Improved inline docs.

1.0.0+7 #

  • Added inline documentation.

1.0.0+6 #

  • Typo.

1.0.0+5 #

  • One more time with feeling!

1.0.0+4 #

  • Are you happy with my image links yet, pub?

1.0.0+3 #

  • Fix image links in README.md

1.0.0+2 #

  • Adjusted project layout to meet pub requirements. Added CHANGELOG.md and dedicated example folder.

1.0.0+1 #

  • Initial release. Tested and stable.

example/README.md

sprung_demo #

A demo project allowing the user to interact with Sprung widgets.

demo of under, critically, and over damped Flutter curves

Use this package as a library

1. Depend on it

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


dependencies:
  sprung: ^1.1.0+11

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:sprung/sprung.dart';
  
Version Uploaded Documentation Archive
1.1.0+11 Dec 20, 2018 Go to the documentation of sprung 1.1.0+11 Download sprung 1.1.0+11 archive
1.1.0+10 Dec 20, 2018 Go to the documentation of sprung 1.1.0+10 Download sprung 1.1.0+10 archive
1.0.0+9 Dec 19, 2018 Go to the documentation of sprung 1.0.0+9 Download sprung 1.0.0+9 archive
1.0.0+8 Dec 19, 2018 Go to the documentation of sprung 1.0.0+8 Download sprung 1.0.0+8 archive
1.0.0+7 Dec 19, 2018 Go to the documentation of sprung 1.0.0+7 Download sprung 1.0.0+7 archive
1.0.0+6 Dec 19, 2018 Go to the documentation of sprung 1.0.0+6 Download sprung 1.0.0+6 archive
1.0.0+5 Dec 19, 2018 Go to the documentation of sprung 1.0.0+5 Download sprung 1.0.0+5 archive
1.0.0+4 Dec 19, 2018 Go to the documentation of sprung 1.0.0+4 Download sprung 1.0.0+4 archive
1.0.0+3 Dec 19, 2018 Go to the documentation of sprung 1.0.0+3 Download sprung 1.0.0+3 archive
1.0.0+2 Dec 19, 2018 Go to the documentation of sprung 1.0.0+2 Download sprung 1.0.0+2 archive

All 11 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
61
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]
80
Learn more about scoring.

We analyzed this package on Mar 6, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14
  • Flutter: 1.3.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
cupertino_icons ^0.1.2 0.1.2
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test