tweenmax 0.1.3

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

tweenmax #

TweenMax-based for Flutter project.

This package is no longer maintained, it's changed to a new package: https://pub.dartlang.org/packages/tweenme

[0.1.3] - Updated TweenMax constructor.

[0.1.2] - Updated TweenMax constructor.

  • Updated TweenMax constructor, make tween's target required.
  • TODO: Add more example projects.
  • TODO: Working with tween timeline.

[0.1.1] - Updated HOMEPAGE.

  • Updated homepage.
  • TODO: Add more example projects.
  • TODO: Working with tween timeline.

[0.1.0] - Updated example & documentation.

  • Added example project & API documentation.
  • Fixed warning messages.
  • TODO: Add more example projects.
  • TODO: Working with tween timeline.

[0.0.1] - First version released.

  • TODO: Waiting for the bugs =))

example/main.dart

import 'package:flutter/material.dart';
import 'package:tweenmax/tweenmax.dart';

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new HomeScreen()
    );
  } 
}

class HomeScreen extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    
    TweenContainer tweenContainer = TweenContainer(
      data: TweenData(
        top: 100, 
        left: 100,
        width: 100,
        height: 100,
        color: Colors.red
      ),
      child: Icon(Icons.star, color: Colors.white)
    );

    return Container(
      color: Colors.black,
      child: Stack(
        children: [
          // tween container
          Align(
            alignment: Alignment.center,
            child: tweenContainer
          ),
          
          // button
          Align(
            alignment: Alignment(0, 0.8),
            child: Row(
              mainAxisSize: MainAxisSize.min,
              children: <Widget>[
                FlatButton(
                  child: Icon(Icons.arrow_back, color: Colors.white),
                  color: Colors.blue,
                  onPressed: (){
                    TweenMax.killTweensOf(tweenContainer);
                    TweenMax.to(
                      tweenContainer,
                      duration: 1,
                      ease: Curves.fastOutSlowIn,
                      data: TweenData(
                        width: 100,
                        height: 100,
                        rotation: 0,
                        scale: Offset(1, 1),
                        opacity: 1,
                        color: Colors.red,
                        // border: Border.all(color: Colors.white, width: 1)
                      ),
                    );
                  },
                ),
                
                // spacing
                SizedBox(width: 5),

                FlatButton(
                  child: Icon(Icons.arrow_forward, color: Colors.white),
                  color: Colors.blue,
                  onPressed: (){
                    TweenMax.killTweensOf(tweenContainer);
                    TweenMax.to(
                      tweenContainer,
                      duration: 1,
                      data: TweenData(
                        width: 250,
                        height: 250,
                        rotation: 180,
                        // scale: Offset(3, 3),
                        // transformOrigin: Offset(0.5, 0.5),
                        color: Colors.blue
                      ),
                      ease: Curves.ease,
                      // repeat: -1,
                      // yoyo: true,
                    );
                  },
                ),

                
              ],
            )
            
          )
          
        ],
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  tweenmax: ^0.1.3

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:tweenmax/tweenmax.dart';
  
Version Uploaded Documentation Archive
0.1.3 Dec 20, 2018 Go to the documentation of tweenmax 0.1.3 Download tweenmax 0.1.3 archive
0.1.2 Dec 18, 2018 Go to the documentation of tweenmax 0.1.2 Download tweenmax 0.1.2 archive
0.1.1 Dec 18, 2018 Go to the documentation of tweenmax 0.1.1 Download tweenmax 0.1.1 archive
0.1.0 Dec 18, 2018 Go to the documentation of tweenmax 0.1.0 Download tweenmax 0.1.0 archive
0.0.1 Dec 18, 2018 Go to the documentation of tweenmax 0.0.1 Download tweenmax 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
75
Overall:
Weighted score of the above. [more]
45
Learn more about scoring.

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

  • Dart: 2.3.2
  • pana: 0.12.18
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/tween_container.dart. (-0.50 points)

Analysis of lib/tween_container.dart reported 1 hint:

line 7 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: TweenContainer.data, TweenContainer.state, TweenContainer.tweens

Fix lib/tweenmax.dart. (-0.50 points)

Analysis of lib/tweenmax.dart reported 1 hint:

line 151 col 9: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

Format lib/tween_data.dart.

Run flutter format to format lib/tween_data.dart.

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://github.com/mrgoonie/flutter_tweenmax was unreachable.

Support latest dependencies. (-5 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
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