MultiAnimationSequence.fromJson constructor
MultiAnimationSequence.fromJson(
- Map map
Implementation
MultiAnimationSequence.fromJson(Map map) {
control = parseCustomAnimationControl(map["control"]) ??
CustomAnimationControl.PLAY;
beginShift = map['beginShift'];
endShift = map['endShift'];
sequences = (map["sequences"] as Map).map((key, value) {
AnimationProperty property = parseAnimationProperty(key);
switch (property) {
case AnimationProperty.opacity:
return MapEntry(property, AnimationSequence<double>.fromJson(value));
case AnimationProperty.alignment:
case AnimationProperty.transformAlignment:
case AnimationProperty.childAlignment:
return MapEntry(
property, AnimationSequence<Alignment>.fromJson(value));
case AnimationProperty.width:
case AnimationProperty.height:
return MapEntry(
property, AnimationSequence<Dimension>.fromJson(value));
case AnimationProperty.margin:
case AnimationProperty.padding:
return MapEntry(
property, AnimationSequence<EdgeInsets>.fromJson(value));
case AnimationProperty.backgroundDecoration:
case AnimationProperty.foregroundDecoration:
return MapEntry(
property, AnimationSequence<BoxDecoration>.fromJson(value));
case AnimationProperty.shadows:
case AnimationProperty.insetShadows:
return MapEntry(
property, AnimationSequence<List<ShapeShadow>>.fromJson(value));
case AnimationProperty.shapeBorder:
return MapEntry(property,
AnimationSequence<MorphableShapeBorder>.fromJson(value));
case AnimationProperty.transform:
return MapEntry(
property, AnimationSequence<SmoothMatrix4>.fromJson(value));
case AnimationProperty.textStyle:
return MapEntry(
property, AnimationSequence<DynamicTextStyle>.fromJson(value));
}
});
}