AnimatedSvg constructor

const AnimatedSvg({
  1. required SvgController controller,
  2. required List<SvgPicture> children,
  3. Key? key,
  4. void onTap()?,
  5. double size = 24.0,
  6. Duration duration = const Duration(milliseconds: 500),
  7. bool clockwise = true,
  8. bool isActive = true,
})

AnimatedSvg Widget

Flutter package for displaying and animating Scalable Vector Graphics 1.1 files.

AnimatedSvg(
  controller: AnimatedSvgController(),
  size: 80,
  children: [
    SvgPicture.asset('assets/play.svg'),
    SvgPicture.asset('assets/pause.svg'),
  ],
)

Implementation

const AnimatedSvg({
  required this.controller,
  required this.children,
  super.key,
  this.onTap,
  this.size = 24.0,
  this.duration = const Duration(milliseconds: 500),
  this.clockwise = true,
  this.isActive = true,
}) : assert(children.length == 2, _kRequiredChildrenAssertMessage);