expand_to_collapse constant

AnimatedVectorData const expand_to_collapse

Animated vector for expand to collapse.

Pairs with collapse_to_expand.

Implementation

static const AnimatedVectorData expand_to_collapse = AnimatedVectorData(
  viewportSize: Size.square(24),
  duration: Duration(milliseconds: 250),
  root: RootVectorElement(
    elements: [
      GroupElement(
        translateX: 12,
        translateY: 15,
        properties: GroupAnimationProperties(
          translateY: [
            AnimationStep(
              tween: ConstTween<double>(begin: 15.0, end: 9.0),
              interval: AnimationInterval(
                end: Duration(milliseconds: 250),
              ),
              curve: Curves.fastOutSlowIn,
            ),
          ],
        ),
        elements: [
          GroupElement(
            rotation: 135,
            properties: GroupAnimationProperties(
              rotation: [
                AnimationStep(
                  tween: ConstTween<double>(begin: 135, end: 45.0),
                  interval: AnimationInterval(
                    end: Duration(milliseconds: 200),
                  ),
                  curve: Curves.fastOutSlowIn,
                ),
              ],
            ),
            elements: [
              GroupElement(
                translateY: 3,
                elements: [
                  PathElement(
                    pathData: PathData.parse("M 1,-4 L 1,4 L -1,4 L -1,-4 Z"),
                    fillColor: Color(0xFF000000),
                  ),
                ],
              ),
            ],
          ),
          GroupElement(
            rotation: 45,
            properties: GroupAnimationProperties(
              rotation: [
                AnimationStep(
                  tween: ConstTween<double>(begin: 45, end: 135.0),
                  interval: AnimationInterval(
                    end: Duration(milliseconds: 200),
                  ),
                  curve: Curves.fastOutSlowIn,
                ),
              ],
            ),
            elements: [
              GroupElement(
                translateY: -3,
                elements: [
                  PathElement(
                    pathData: PathData.parse("M 1,-4 L 1,4 L -1,4 L -1,-4 Z"),
                    fillColor: Color(0xFF000000),
                  ),
                ],
              ),
            ],
          ),
        ],
      ),
    ],
  ),
);