Giter Site home page Giter Site logo

hrx03 / animated_vector Goto Github PK

View Code? Open in Web Editor NEW
21.0 4.0 1.0 3.26 MB

A flutter package that adds support for vector data based animations.

Home Page: https://pub.dev/packages/animated_vector

License: MIT License

Dart 84.91% CMake 6.15% C++ 7.30% C 0.45% Kotlin 0.04% Swift 0.55% Objective-C 0.01% HTML 0.58%
animation flutter flutter-library svg svg-animations vector

animated_vector's People

Contributors

hrx03 avatar jupi007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

jupi007

animated_vector's Issues

Keep getting `The animation intervals for this PathAnimationProperties object are not valid`

I keep encountering this error, and I am unsure of the cause and how to fix it. Can you help me figure out a solution? thank you

════════════════════════════════════════════════════════════════════════════════

════════ Exception caught by rendering library ═════════════════════════════════
The animation intervals for this PathAnimationProperties object are not valid. Usually this means two or more intervals overlap with each other, causing ambiguites over which value to pick.
'package:animated_vector/src/animation.dart':
Failed assertion: line 34 pos 9: 'checkForIntervalsValidity(field)'

Usage

class _$AccordionAnimatedIcon extends StatelessWidget {
  const _$AccordionAnimatedIcon({
    required this.position,
    required this.type,
    required this.iconSize,
    required this.iconColor,
  });

  final double iconSize;
  final Color iconColor;
  final Animation<double> position;
  final $KamonaAccordionIconType type;

  @override
  Widget build(BuildContext context) {
    return AnimatedVector(
      vector: KamonaAnimatedIcon.chevronTopToBottom,
      size: Size.square(iconSize),
      applyTheme: true,
      progress: position,
      color: iconColor,
    );
  }
}

shapeshifter

{
  "version": 1,
  "layers": {
    "vectorLayer": {
      "id": "23",
      "name": "chevron_top_to_bottom",
      "type": "vector",
      "width": 24,
      "height": 24,
      "children": [
        {
          "id": "25",
          "name": "primary_group",
          "type": "group",
          "pivotX": 12,
          "pivotY": 12,
          "children": [
            {
              "id": "55",
              "name": "primary_path",
              "type": "path",
              "pathData": "M 18 15 C 18 15 13.581 9 12 9 C 10.419 9 6 15 6 15",
              "strokeColor": "#a1abbf",
              "strokeWidth": 1.5,
              "strokeLinecap": "round",
              "strokeLinejoin": "round"
            }
          ]
        },
        {
          "id": "63",
          "name": "secondary_group",
          "type": "group",
          "pivotX": 12,
          "pivotY": 12,
          "children": [
            {
              "id": "37",
              "name": "secondary_path",
              "type": "path",
              "pathData": "M 18 15 C 18 15 13.581 9 12 9 C 10.419 9 6 15 6 15",
              "strokeColor": "#a1abbf",
              "strokeWidth": 1.5,
              "strokeLinecap": "round",
              "strokeLinejoin": "round"
            }
          ]
        }
      ]
    },
    "hiddenLayerIds": []
  },
  "timeline": {
    "animation": {
      "id": "18",
      "name": "anim",
      "duration": 400,
      "blocks": [
        {
          "id": "62",
          "layerId": "25",
          "propertyName": "rotation",
          "startTime": 0,
          "endTime": 400,
          "interpolator": "FAST_OUT_SLOW_IN",
          "type": "number",
          "fromValue": 0,
          "toValue": 180
        },
        {
          "id": "64",
          "layerId": "63",
          "propertyName": "rotation",
          "startTime": 0,
          "endTime": 400,
          "interpolator": "FAST_OUT_SLOW_IN",
          "type": "number",
          "fromValue": 0,
          "toValue": -180
        },
        {
          "id": "65",
          "layerId": "37",
          "propertyName": "strokeColor",
          "startTime": 200,
          "endTime": 400,
          "interpolator": "FAST_OUT_SLOW_IN",
          "type": "color",
          "fromValue": "#4da1abbf",
          "toValue": "#00a1abbf"
        },
        {
          "id": "66",
          "layerId": "37",
          "propertyName": "strokeColor",
          "startTime": 0,
          "endTime": 200,
          "interpolator": "FAST_OUT_SLOW_IN",
          "type": "color",
          "fromValue": "#00a1abbf",
          "toValue": "#4da1abbf"
        },
        {
          "id": "68",
          "layerId": "55",
          "propertyName": "strokeColor",
          "startTime": 200,
          "endTime": 400,
          "interpolator": "FAST_OUT_SLOW_IN",
          "type": "color",
          "fromValue": "#80a1abbf",
          "toValue": "#a1abbf"
        },
        {
          "id": "69",
          "layerId": "55",
          "propertyName": "strokeColor",
          "startTime": 0,
          "endTime": 200,
          "interpolator": "FAST_OUT_SLOW_IN",
          "type": "color",
          "fromValue": "#a1abbf",
          "toValue": "#80a1abbf"
        }
      ]
    }
  }
}

Required `collection` version is incompatible with flutter

I'm actually trying to include this library, and it is reporting this error:

Because every version of yaru_icons from path depends on animated_vector from git which depends on collection ^1.18.0, every version of yaru_icons from path requires collection ^1.18.0.
And because every version of flutter from sdk depends on collection 1.17.2, yaru_icons from path is incompatible with flutter from sdk.
So, because example depends on both flutter from sdk and yaru_icons from path, version solving failed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.