Skip to content

Support infinit animations in a style #788

@dickermoshe

Description

@dickermoshe

Use case

It would be nice if we could define a box which spins forever in a style

Proposal

BoxStyler().phaseAnimation(
      running: true, // If set to true, this style will run from "start" -> "end" -> "start" ...
      phases: ["start", "end"],
      styleBuilder: (phase, style) {
        if (phase == "start") {
          return style.rotate(0);
        }
        return style.rotate(360);
      },
      configBuilder: (phase) {
        return CurveAnimationConfig.linear(Duration(seconds: 1));
      },
    );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions