tweenmax 0.1.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 43

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

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

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health suggestions

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

Analysis of lib/tween_container.dart reported 7 hints, including:

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

line 37 col 20: 'ancestorStateOfType' is deprecated and shouldn't be used. Use findAncestorStateOfType instead. This feature was deprecated after v1.12.1..

line 37 col 40: 'TypeMatcher' is deprecated and shouldn't be used. TypeMatcher has been deprecated because it is no longer used in framework(only in deprecated methods). This feature was deprecated after v1.12.1..

line 70 col 34: 'ancestorRenderObjectOfType' is deprecated and shouldn't be used. Use findAncestorRenderObjectOfType instead. This feature was deprecated after v1.12.1..

line 70 col 61: 'TypeMatcher' is deprecated and shouldn't be used. TypeMatcher has been deprecated because it is no longer used in framework(only in deprecated methods). This feature was deprecated after v1.12.1..

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

Analysis of lib/tweenmax.dart reported 1 hint:

line 151 col 9: The class 'Future' wasn't 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.

Package is getting outdated. (-7.40 points)

The package was last published 56 weeks ago.

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 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test