All Projects → flutter-studio → animated_interpolation

flutter-studio / animated_interpolation

Licence: other
A flutter interpolation plugin inspired by the React Native interpolation animation

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to animated interpolation

HypertextLiteral.jl
Julia library for the string interpolation of HTML and SVG
Stars: ✭ 43 (+115%)
Mutual labels:  interpolation
haraka
Stateful animations in React Native.
Stars: ✭ 71 (+255%)
Mutual labels:  animated
rx-ease
Spring animation operator for rxjs 🦚✨
Stars: ✭ 16 (-20%)
Mutual labels:  interpolation
react-native-multiple-select
Customizable & Animated, Easy to Use Multiple Select Library for React Native
Stars: ✭ 31 (+55%)
Mutual labels:  animated
vue-typical
🐡 Vue Animated typing in ~400 bytes of JavaScript
Stars: ✭ 121 (+505%)
Mutual labels:  animated
smoothr
A custom React router that leverages the Web Animations API and CSS animations.
Stars: ✭ 28 (+40%)
Mutual labels:  animated
2dimagefilter
A collection of image filters, some especially suited to scale-up low res computer graphics.
Stars: ✭ 32 (+60%)
Mutual labels:  interpolation
fl animated linechart
Animated line chart for flutter
Stars: ✭ 48 (+140%)
Mutual labels:  animated
commons-math-interpolation
A partial TypeScript port of the Apache Commons Math Interpolation package, including Akima cubic spline interpolation and LOESS/LOWESS local regression.
Stars: ✭ 18 (-10%)
Mutual labels:  interpolation
BASH-Model
We developed a method animating a statistical 3D human model for biomechanical analysis to increase accessibility for non-experts, like patients, athletes, or designers.
Stars: ✭ 51 (+155%)
Mutual labels:  animated
bitmapflow
A tool to generate inbetweens for animated sprites, written in godot-rust
Stars: ✭ 388 (+1840%)
Mutual labels:  interpolation
animwall
Animated wallpapers for Linux
Stars: ✭ 28 (+40%)
Mutual labels:  animated
safe-string-interpolation
A type driven approach to string interpolation, aiming at consistent, secure, and only-human-readable logs and console outputs !
Stars: ✭ 14 (-30%)
Mutual labels:  interpolation
react-spring-pop
Animate React elements when they enter the viewport with physics based animations
Stars: ✭ 17 (-15%)
Mutual labels:  animated
Bicubic-interpolation
Bicubic interpolation for images (Python)
Stars: ✭ 88 (+340%)
Mutual labels:  interpolation
Black-hole-simulation-using-python
Non-spinning black hole simulation based on geodesics equation
Stars: ✭ 60 (+200%)
Mutual labels:  interpolation
react-native-animated-carousel
🦄 A wonderful animated carsouel hooks component for React-Native
Stars: ✭ 16 (-20%)
Mutual labels:  animated
gifterm
View animated .GIF files in a text console. Linux/Mac/Windows
Stars: ✭ 14 (-30%)
Mutual labels:  animated
split-ease
The JavaScript Easing function with a beginning, middle and end
Stars: ✭ 55 (+175%)
Mutual labels:  interpolation
react-native-animated-menu
Top-down animated menu transition concept
Stars: ✭ 56 (+180%)
Mutual labels:  animated

English | 简体中文

animated_interpolation

pub package

图片名称 图片名称 图片名称


A flutter interpolation plugin inspired by the React Native interpolation animation

Usage

To use this plugin, add animated_interpolation as a dependency in your pubspec.yaml file.

InterpolationTween

constructor

Parameter Required Default Description
inputRange YES NULL Set the range of input,eg: [0,0.2,0.5,0.8,1]
outputRange YES NULL Set the range of input eg: [10,100,105,200,300]
curve NO _Linear._() Set the input/output animation curve
extrapolate NO NULL it will extrapolate the curve beyond the ranges given, but you can also have it clamp the output value
extrapolateLeft NO ExtrapolateType.extend It will extrapolate the curve beyond the given left range
extrapolateRight NO ExtrapolateType.extend It will extrapolate the curve beyond the given right range

SmartTabBar

The SmartTabbar Widget is formed by adding a indicatorBuilder property to the official Tabbar,It is used in the same way as the official Tabbar,For details, please see example

SmartAnimatedWidget

constructor

Parameter Required Default Description
from No NULL It's similar to the from for keyframes in css3,eg: AnimatedConfig(opacity: 0)
to No NULL It's similar to the to for keyframes in css3 ,eg:AnimatedConfig(opacity:1)
configMap NO NULL Similar to keyframes in css3,eg:{0:AnimatedConfig(opacity:0,translateX: 200),0.2:AnimatedConfig(opacity:1,translateX:100),1:AnimatedConfig(opacity:1,translateX:0)}
curve NO _Linear._() Set the input/output animation curve
duration NO Duration(seconds: 1) Animation execution time
autoPlay NO false Whether to automatically animate
onAnimationStart NO NULL A function that is called when the animation has been started.
onAnimationEnd NO NULL A function that is called when the animation has been completed successfully or cancelled
delay NO Duration(seconds:0) Optionally delay animation
iterationCount NO 1 How many times to run the animation
iterationInfinite NO false Whether to loop through the animation
iterationDelay NO Duration(seconds: 0) For how long to pause between animation iterations
direction NO AnimatedDirection.normal Direction of animation, especially useful for repeating animations. Valid values: AnimatedDirection.normal, AnimatedDirection.reverse, AnimatedDirection.alternate, AnimatedDirection.alternateReverse

method

method Description
animate Execute the appropriate animation

configMap

The existing configMap is shown below

  • fadeInDown

  • fadeInUp

  • fadeInLeft

  • fadeInRight

  • fadeInDownBig

  • fadeInUpBig

  • fadeInLeftBig

  • fadeInRightBig

  • fadeOutDown

  • fadeOutUp

  • fadeOutLeft

  • fadeOutRight

  • fadeOutDownBig

  • fadeOutUpBig

  • fadeOutLeftBig

  • fadeOutRightBig

    ....... For more information on configMap, please see more details

Example

import 'package:flutter/material.dart';
import 'package:animated_interpolation/animated_interpolation.dart';
SmartAnimatedWidget(
        configMap: fadeInDown,
        autoPlay: true,
        child: Container(
          margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 15),
          padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 15),
          width: double.infinity,
          color: Colors.red.shade300,
          child: Center(
            child: Text(text),
          ),
        ),
      )
import 'package:flutter/material.dart';
import 'package:animated_interpolation/animated_interpolation.dart';
class AnimatedLogo1 extends AnimatedWidget {
  // The Tweens are static because they don't change.
  static final _opacityTween = new InterpolationTween<double>(inputRange: [0,0.2,1], outputRange: [0,0.5,1]);
  static final _sizeTween = new InterpolationTween(inputRange: [0,0.2,1], outputRange: [0,250,300]);

  AnimatedLogo1({Key key, Animation<double> animation})
      : super(key: key, listenable: animation);

  Widget build(BuildContext context) {
    final Animation<double> animation = listenable;
    return new Center(
      child: new Opacity(
        opacity: _opacityTween.evaluate(animation),
        child: new Container(
          margin: new EdgeInsets.symmetric(vertical: 10.0),
          height: _sizeTween.evaluate(animation),
          width: _sizeTween.evaluate(animation),
          child: new FlutterLogo(),
        ),
      ),
    );
  }
}

class LogoApp4 extends StatefulWidget {
  _LogoAppState createState() => new _LogoAppState();
}

class _LogoAppState extends State<LogoApp4> with TickerProviderStateMixin {
  AnimationController controller;
  Animation<double> animation;

  initState() {
    super.initState();
    controller = new AnimationController(
        duration: const Duration(milliseconds: 2000), vsync: this);
    animation = new CurvedAnimation(parent: controller, curve: Curves.easeIn);


    animation.addStatusListener((status) {
      if (status == AnimationStatus.completed) {
        controller.reverse();
      } else if (status == AnimationStatus.dismissed) {
        controller.forward();
      }
    });

    controller.forward();
  }

  Widget build(BuildContext context) {
    return new AnimatedLogo1(animation: animation);
  }

  dispose() {
    controller.dispose();
    super.dispose();
  }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].