SvgDrawingAnimation constructor
const
SvgDrawingAnimation(
- SvgProvider svgProvider, {
- Key? key,
- Duration? duration,
- double? speed,
- Curve curve = Curves.linear,
- bool repeats = false,
- Animation<
double> ? animation, - LoadingWidgetBuilder loadingWidgetBuilder = defaultLoadingWidgetBuilder,
- ErrorWidgetBuilder errorWidgetBuilder = defaultErrorWidgetBuilder,
- PenRenderer? penRenderer,
Implementation
const SvgDrawingAnimation(this.svgProvider,
{super.key,
this.duration,
this.speed,
this.curve = Curves.linear,
this.repeats = false,
this.animation,
this.loadingWidgetBuilder = defaultLoadingWidgetBuilder,
this.errorWidgetBuilder = defaultErrorWidgetBuilder,
this.penRenderer})
: assert(!(duration == null && speed == null && animation == null),
'You must set a duration, speed or animation.'),
assert(
animation == null && duration != null && speed == null ||
animation == null && speed != null && duration == null ||
animation != null && speed == null && duration == null,
'Only one of duration or speed can be used at a time.');